aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-21 09:32:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-21 09:32:50 +0200
commit9bb8b63156f6dfb42f9ddab77f253ae0bda02d5a (patch)
tree1e219ff6a32dc3d4d32f5ec68dbe308634aba459 /libbuild2/target.hxx
parent8826a6a6823e8c5957a5b7418e93f0b78be20eef (diff)
Add target::append_locked() variant
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r--libbuild2/target.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index 46c0949..5283ab8 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -782,12 +782,14 @@ namespace build2
// If target_only is true, then only look in target and its target group
// without continuing in scopes. As an optimization, the caller can also
- // pass the base scope of the target, if already known.
+ // pass the base scope of the target, if already known. If locked is true,
+ // assume the targets mutex is locked.
//
pair<lookup_type, size_t>
lookup_original (const variable&,
bool target_only = false,
- const scope* bs = nullptr) const;
+ const scope* bs = nullptr,
+ bool locked = false) const;
// Return a value suitable for assignment. See scope for details.
//
@@ -802,6 +804,10 @@ namespace build2
value&
append (const variable&);
+ // As above but assume the targets mutex is locked.
+ //
+ value&
+ append_locked (const variable&);
// Rule hints.
//