Skip to content
Snippets Groups Projects
Commit fe4019ec authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Correct locking/unlocking of drift task

parent 1f5f33bb
No related branches found
No related tags found
1 merge request!292Drift on demand
......@@ -261,6 +261,11 @@ void task_unlock(struct task *t) {
/* Act based on task type. */
switch (type) {
case task_type_drift:
cell_unlocktree(ci);
cell_gunlocktree(ci);
break;
case task_type_sort:
cell_unlocktree(ci);
break;
......@@ -328,6 +333,15 @@ int task_lock(struct task *t) {
#endif
break;
case task_type_drift:
if (ci->hold || ci->ghold) return 0;
if (cell_locktree(ci) != 0) return 0;
if (cell_glocktree(ci) != 0) {
cell_unlocktree(ci);
return 0;
}
break;
case task_type_sort:
if (cell_locktree(ci) != 0) return 0;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment