From 042a541b08d306e846085fa1ca42d533a6f61734 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Oct 2024 15:12:18 +0200 Subject: Tweak some more fix for data race in ad hoc member state when group is postponed --- libbuild2/target-state.hxx | 3 ++- libbuild2/target.hxx | 5 ++--- 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. -- cgit v1.1