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
4a4aa459
Commit
4a4aa459
authored
Jul 14, 2018
by
Matthieu Schaller
Browse files
Lock and unlock both cells when trying to run the gravity M-M task.
parent
eeaa0e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
4a4aa459
...
...
@@ -317,11 +317,15 @@ void task_unlock(struct task *t) {
cell_munlocktree
(
ci
);
break
;
case
task_type_grav_mm
:
case
task_type_grav_long_range
:
cell_munlocktree
(
ci
);
break
;
case
task_type_grav_mm
:
cell_munlocktree
(
ci
);
cell_munlocktree
(
cj
);
break
;
default:
break
;
}
...
...
@@ -444,12 +448,20 @@ int task_lock(struct task *t) {
break
;
case
task_type_grav_long_range
:
case
task_type_grav_mm
:
/* Lock the m-poles */
if
(
ci
->
mhold
)
return
0
;
if
(
cell_mlocktree
(
ci
)
!=
0
)
return
0
;
break
;
case
task_type_grav_mm
:
/* Lock both m-poles */
if
(
ci
->
mhold
||
cj
->
mhold
)
return
0
;
if
(
cell_mlocktree
(
ci
)
!=
0
)
return
0
;
if
(
cell_mlocktree
(
cj
)
!=
0
)
{
cell_munlocktree
(
ci
);
return
0
;
}
default:
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