aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-buildscript.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-12 10:46:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-12 16:30:12 +0200
commit88379eedeae654391711d8cdda17dfc2be6367ef (patch)
tree966ee03369b51013021600a2beea8334962ab2ec /libbuild2/adhoc-rule-buildscript.cxx
parent8b858c642ccab43050dcff2d8f98db469ac6dc1b (diff)
Keep phase locked while working own queue
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.cxx')
-rw-r--r--libbuild2/adhoc-rule-buildscript.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx
index 168856c..73219b6 100644
--- a/libbuild2/adhoc-rule-buildscript.cxx
+++ b/libbuild2/adhoc-rule-buildscript.cxx
@@ -265,9 +265,7 @@ namespace build2
const target& pt (*p.target);
- const auto& tc (pt[a].task_count);
- if (tc.load (memory_order_acquire) >= busy)
- ctx.sched.wait (exec, tc, scheduler::work_none);
+ ctx.sched.wait (exec, pt[a].task_count, scheduler::work_none);
target_state s (pt.executed_state (a));
rs |= s;