From b47a323f09f1f9ccece03ca4d84dbe7a47ff8177 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Oct 2019 10:02:23 +0200 Subject: Move global mutex shards to context --- libbuild2/scope.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libbuild2/scope.cxx') 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 entry ( s->target_vars.cache.insert ( + ctx, make_tuple (&v, tt, *tn), stem, static_cast (v).version, @@ -436,6 +437,7 @@ namespace build2 pair entry ( cache.insert ( + ctx, make_pair (&var, inner_vars), stem, 0, // Overrides are immutable. -- cgit v1.1