Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
fe4019ec
Commit
fe4019ec
authored
Dec 06, 2016
by
Matthieu Schaller
Browse files
Correct locking/unlocking of drift task
parent
1f5f33bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
fe4019ec
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment