[concurrency-interest] Non-volatile reads

Andrew Haley aph at redhat.com
Wed Apr 26 13:16:13 EDT 2017


On 26/04/17 16:11, Bobrowski, Maciej wrote:
> Q2. Given the above, after the flushing of the buffers happen, the other thread will be forced to re-read x from main mem (or L3 cache) and update its local value,, effectively seeing the new value. Correct?

No.  There is only a volatile write.  For the other thread to see
the volatile write, there has to be a volatile read to synchronize
with.

Andrew.



More information about the Concurrency-interest mailing list