Commit 743bb727 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

No need to lock the tree for the grav-mesh task

parent 1a0a937b
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment