aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-22 10:02:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-22 10:17:41 +0200
commitb47a323f09f1f9ccece03ca4d84dbe7a47ff8177 (patch)
tree7c520e5878b1988425520424c5e372f7439636d9 /libbuild2/scope.cxx
parent1bbd6bdb1bbf6783aefd10392e5c0599318a927f (diff)
Move global mutex shards to context
Diffstat (limited to 'libbuild2/scope.cxx')
-rw-r--r--libbuild2/scope.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/scope.cxx b/libbuild2/scope.cxx
index d6251a4..d076fce 100644
--- a/libbuild2/scope.cxx
+++ b/libbuild2/scope.cxx
@@ -28,10 +28,10 @@ namespace build2
// Process target type/pattern-specific prepend/append values.
//
- auto pre_app = [&var] (lookup& l,
- const scope* s,
- const target_type* tt, const string* tn,
- const target_type* gt, const string* gn)
+ auto pre_app = [&var, this] (lookup& l,
+ const scope* s,
+ const target_type* tt, const string* tn,
+ const target_type* gt, const string* gn)
{
const value& v (*l);
assert ((v.extra == 1 || v.extra == 2) && v.type == nullptr);
@@ -51,6 +51,7 @@ namespace build2
//
pair<value&, ulock> entry (
s->target_vars.cache.insert (
+ ctx,
make_tuple (&v, tt, *tn),
stem,
static_cast<const variable_map::value_data&> (v).version,
@@ -436,6 +437,7 @@ namespace build2
pair<value&, ulock> entry (
cache.insert (
+ ctx,
make_pair (&var, inner_vars),
stem,
0, // Overrides are immutable.