[concurrency-interest] "Volatile-like" guarantees

Niko Matsakis niko at alum.mit.edu
Thu Feb 3 00:55:45 EST 2011


Niko Matsakis wrote:
> So, my first instinct was to place the volatile writes/reads in the 
> order you show here, but I'm not sure that it provides the proper 
> guarantees.  In particular, isn't it possible that in some program run 
> Rv synchronizes with Wv, but Rf still sees the write from Wf? In that 
> case, the reads that follow Rf would not happen after the writes that 
> preceded Wf.
Sorry, I wrote "Rv synchronizes with Wv", but I meant "Rv appears before 
Wv in the total synchronization order".  (In other words, Wv does not 
happen before Rv.) I had the impression those were synonyms, but 
re-reading the POPL JMM paper [1] I see that is not the case.



Niko

[1] http://doi.acm.org/10.1145/1040305.1040336


More information about the Concurrency-interest mailing list