aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-10-29 15:12:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-10-29 15:12:18 +0200
commit042a541b08d306e846085fa1ca42d533a6f61734 (patch)
treeb4fc4abc577bef77952c23d8dc014685a70ed473
parent653748e3673f515c2ceabe9ef2d57ba087abeb7a (diff)
Tweak some more fix for data race in ad hoc member state when group is postponed
-rw-r--r--libbuild2/target-state.hxx3
-rw-r--r--libbuild2/target.hxx5
2 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/target-state.hxx b/libbuild2/target-state.hxx
index a6106f7..df54876 100644
--- a/libbuild2/target-state.hxx
+++ b/libbuild2/target-state.hxx
@@ -25,7 +25,8 @@ namespace build2
//
enum class target_state: uint8_t
{
- unknown = 1,
+ uninitialized = 0,
+ unknown,
unchanged,
postponed,
busy,
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index 72d6dbc..ae45082 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -957,10 +957,9 @@ namespace build2
//
// Note that it is undetermined until a rule is matched and recipe
// applied (see set_recipe()). However, we need it to be not postponed
- // for ad hoc members that are not matched (see group_state()) so
- // initialize it to unknown.
+ // for ad hoc members that are not matched (see group_state()).
//
- target_state state = target_state::unknown;
+ target_state state = target_state::uninitialized;
// Set to true (only for the inner action) if this target has been
// matched but not executed as a result of the resolve_members() call.