aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-26 16:10:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commit267d34d2800d9cc3ed2865cbecf8d32f8f1ab6ec (patch)
tree9450ae27a2608319d353809aaf74534c79ad797b
parent93dbdacafb07b674467aa30c4aefd38bb3871601 (diff)
Add comment
-rw-r--r--build2/context8
1 files changed, 5 insertions, 3 deletions
diff --git a/build2/context b/build2/context
index 9f1e956..7f533ca 100644
--- a/build2/context
+++ b/build2/context
@@ -14,12 +14,14 @@
namespace build2
{
- // Top-level internal state mutex.
+ // Top-level model (internal state) mutex and its per-thread shared lock.
+ //
+ // - model_lock is NULL during serial execution, all changes are a go
+ // - model_lock is not NULL during parallel execution, append-only changes
+ // - parallel execution starts with a shared lock by creating model_slock
//
extern shared_mutex model;
- // Thread's shared model lock. NULL in the serial stages.
- //
extern
#ifdef __cpp_thread_local
thread_local