aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 14258b3..01d9378 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -273,7 +273,7 @@ main (int argc, char* argv[])
keep_going = !ops.serial_stop ();
- // Start up the scheduler.
+ // Start up the scheduler and allocate lock shards.
//
size_t jobs (0);
@@ -296,6 +296,10 @@ main (int argc, char* argv[])
sched.startup (jobs);
+ variable_cache_mutex_shard_size = sched.shard_size ();
+ variable_cache_mutex_shard.reset (
+ new shared_mutex[variable_cache_mutex_shard_size]);
+
// Trace some overall environment information.
//
if (verb >= 5)