aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-23 08:02:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 08:02:15 +0200
commit6cc8301e4fb819393c1245cea0fbfb89e69b90b4 (patch)
tree33e20e06841b107600dfa9bce551ef9d723be497 /libbuild2/target.cxx
parent604cef5bc09a2c4631eb3948dd788381dc5b4edb (diff)
Meta/operations and counts
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r--libbuild2/target.cxx7
1 files changed, 4 insertions, 3 deletions
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.