From 6cc8301e4fb819393c1245cea0fbfb89e69b90b4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 23 Aug 2019 08:02:15 +0200 Subject: Meta/operations and counts --- libbuild2/target.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libbuild2/target.cxx') diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 977c75c..5e6db5a 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -544,10 +544,11 @@ namespace build2 // Similar logic to matched_state_impl(). // const opstate& s (state[action () /* inner */]); - size_t o (s.task_count.load (memory_order_relaxed) - // Synchronized. - target::count_base ()); - if (o != target::offset_applied && o != target::offset_executed) + // Note: already synchronized. + size_t o (s.task_count.load (memory_order_relaxed) - ctx.count_base ()); + + if (o != offset_applied && o != offset_executed) break; } // Fall through. -- cgit v1.1