diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 08:02:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-23 08:02:15 +0200 |
commit | 6cc8301e4fb819393c1245cea0fbfb89e69b90b4 (patch) | |
tree | 33e20e06841b107600dfa9bce551ef9d723be497 /libbuild2/target.ixx | |
parent | 604cef5bc09a2c4631eb3948dd788381dc5b4edb (diff) |
Meta/operations and counts
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index e7fef17..980df7c 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -93,16 +93,17 @@ namespace build2 // Note that the "tried" state is "final". // const opstate& s (state[a]); - size_t o (s.task_count.load (memory_order_relaxed) - // Synchronized. - target::count_base ()); - if (o == target::offset_tried) + // Note: already synchronized. + size_t o (s.task_count.load (memory_order_relaxed) - ctx.count_base ()); + + if (o == offset_tried) return make_pair (false, target_state::unknown); else { // Normally applied but can also be already executed. // - assert (o == target::offset_applied || o == target::offset_executed); + assert (o == offset_applied || o == offset_executed); return make_pair (true, (group_state (a) ? group->state[a] : s).state); } } |