Skip to content
GitLab
Menu
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
743bb727
Commit
743bb727
authored
May 19, 2020
by
Matthieu Schaller
Browse files
No need to lock the tree for the grav-mesh task
parent
1a0a937b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
743bb727
...
...
@@ -443,7 +443,6 @@ void task_unlock(struct task *t) {
break
;
case
task_type_drift_gpart
:
case
task_type_grav_mesh
:
case
task_type_end_grav_force
:
cell_gunlocktree
(
ci
);
break
;
...
...
@@ -538,6 +537,12 @@ void task_unlock(struct task *t) {
#endif
break
;
case
task_type_grav_mesh
:
#ifdef SWIFT_TASKS_WITHOUT_ATOMICS
cell_gunlocktree
(
ci
);
#endif
break
;
case
task_type_star_formation
:
cell_unlocktree
(
ci
);
cell_sunlocktree
(
ci
);
...
...
@@ -623,7 +628,6 @@ int task_lock(struct task *t) {
case
task_type_drift_gpart
:
case
task_type_end_grav_force
:
case
task_type_grav_mesh
:
if
(
ci
->
grav
.
phold
)
return
0
;
if
(
cell_glocktree
(
ci
)
!=
0
)
return
0
;
break
;
...
...
@@ -800,6 +804,14 @@ int task_lock(struct task *t) {
#endif
break
;
case
task_type_grav_mesh
:
#ifdef SWIFT_TASKS_WITHOUT_ATOMICS
/* Lock the gparts */
if
(
ci
->
grav
.
phold
)
return
0
;
if
(
cell_glocktree
(
ci
)
!=
0
)
return
0
;
#endif
break
;
case
task_type_star_formation
:
/* Lock the gas, gravity and star particles */
if
(
ci
->
hydro
.
hold
||
ci
->
stars
.
hold
||
ci
->
grav
.
phold
)
return
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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