diff options
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r-- | libbuild2/target.cxx | 7 |
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. |