diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-22 13:03:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-22 13:03:21 +0200 |
commit | cee00343d0c537a31281b4de74fadd7589d434b0 (patch) | |
tree | e431925cb8d77194c9ae564dedc2739030b202b7 /libbuild2/context.hxx | |
parent | bf8fd996b6651edcbb2235bbc6fae307a3638611 (diff) |
Rename global_mutex_shards to global_mutexes
Diffstat (limited to 'libbuild2/context.hxx')
-rw-r--r-- | libbuild2/context.hxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx index cc34803..60f5ba8 100644 --- a/libbuild2/context.hxx +++ b/libbuild2/context.hxx @@ -99,14 +99,19 @@ namespace build2 mutex lm_; }; - class global_mutex_shards + // Context-wide mutexes and mutex shards. + // + class global_mutexes { public: + + // Variable cache mutex shard (see variable.hxx for details). + // size_t variable_cache_size; unique_ptr<shared_mutex[]> variable_cache; explicit - global_mutex_shards (size_t vc) + global_mutexes (size_t vc) : variable_cache_size (vc), variable_cache (new shared_mutex[variable_cache_size]) {} }; @@ -134,7 +139,7 @@ namespace build2 public: scheduler& sched; - global_mutex_shards& mutex_shards; + global_mutexes& mutexes; // Dry run flag (see --dry-run|-n). // @@ -425,7 +430,7 @@ namespace build2 // explicit context (scheduler&, - global_mutex_shards&, + global_mutexes&, bool dry_run = false, bool keep_going = true, const strings& cmd_vars = {}, |