From ca6a61f432f3ff0257e868bed36a58540623ab49 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 11 Dec 2020 20:53:32 +0300 Subject: Fix bug in create_new_target_locked() --- libbuild2/cc/common.txx | 2 +- libbuild2/cc/compile-rule.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2/cc') diff --git a/libbuild2/cc/common.txx b/libbuild2/cc/common.txx index ce922cc..d14f966 100644 --- a/libbuild2/cc/common.txx +++ b/libbuild2/cc/common.txx @@ -27,7 +27,7 @@ namespace build2 target_decl::implied, trace)); - assert (!exist || !p.second.owns_lock ()); + assert (!exist || !p.second); r = &p.first.template as (); return move (p.second); } diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index a11b7ab..b96c39d 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -6051,7 +6051,7 @@ namespace build2 // Note that this is racy and someone might have created this target // while we were preparing the prerequisite list. // - if (p.second.owns_lock ()) + if (p.second) { bt.prerequisites (move (ps)); @@ -6129,7 +6129,7 @@ namespace build2 // Note that this is racy and someone might have created this target // while we were preparing the prerequisite list. // - if (p.second.owns_lock ()) + if (p.second) bt.prerequisites (move (ps)); return bt; -- cgit v1.1