From 566bcb8c4c36d12e398f00349c5f27cae06fa7a9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Jul 2017 18:40:52 +0200 Subject: Implement displaying build progress (--progress|-p) --- build2/algorithm.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build2/algorithm.cxx') 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--; -- cgit v1.1