aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r--build2/algorithm.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index fe71d54..588980e 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -830,6 +830,8 @@ namespace build2
ts = t.recipe_ (a, t);
+ target_count.fetch_sub (1, memory_order_relaxed);
+
// See the recipe documentation for details on what's going on here.
// Note that if the result is group, then the group's state can be
// failed.
@@ -876,8 +878,8 @@ namespace build2
// Update dependency counts and make sure they are not skew.
//
+ size_t gd (dependency_count.fetch_sub (1, memory_order_relaxed));
size_t td (t.dependents.fetch_sub (1, memory_order_release));
- size_t gd (dependency_count.fetch_sub (1, memory_order_release));
assert (td != 0 && gd != 0);
td--;