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.ixx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbuild2/target.ixx') 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); } } -- cgit v1.1