diff options
Diffstat (limited to 'src/sync/atomic')
| -rw-r--r-- | src/sync/atomic/doc.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sync/atomic/doc.go b/src/sync/atomic/doc.go index bb3b8f673e..4d426826da 100644 --- a/src/sync/atomic/doc.go +++ b/src/sync/atomic/doc.go @@ -36,6 +36,14 @@ // The load and store operations, implemented by the LoadT and StoreT // functions, are the atomic equivalents of "return *addr" and // "*addr = val". +// +// In the terminology of the Go memory model, if the effect of +// an atomic operation A is observed by atomic operation B, +// then A “synchronizes before” B. +// Additionally, all the atomic operations executed in a program +// behave as though executed in some sequentially consistent order. +// This definition provides the same semantics as +// C++'s sequentially consistent atomics and Java's volatile variables. package atomic import ( |
