Skip to content

Commit b2ba23a

Browse files
committed
Improve volatile description
1 parent f0c4cce commit b2ba23a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/synchronization.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,13 @@ C++11). This is not a formal model.
7171
Key properties are:
7272

7373
- **volatility (V)** - Any written value is immediately visible to any
74-
subsequent volatile reads including all writes leading to this value. (Same
75-
meaning as in Java.)
74+
subsequent volatile read of the same variable. Any write executed before
75+
volatile write based on program-order is visible to the read as well, which
76+
allows
77+
[piggybacking](http://stackoverflow.com/questions/8769570/volatile-piggyback-is-this-enough-for-visiblity).
78+
(Same meaning as in Java, it creates synchronizes-with (JMM term) order
79+
between write and read, which participates in creating happens-before
80+
order.)
7681
- **atomicity (A)** - Operation is either done or not as a whole.
7782
- **serialized (S)** - Operations are serialized in some order (they
7883
cannot disappear). This is a new property not mentioned in other memory

0 commit comments

Comments
 (0)