[cpp-threads] Causality on more than two processors, write atomicity

Doug Lea dl at cs.oswego.edu
Tue Sep 6 00:29:02 BST 2005


Alexander Terekhov wrote:
> On 9/5/05, Doug Lea <dl at cs.oswego.edu> wrote:
> [...]
> 
>>>And I just wonder how revised Java volatiles (which supposedly meant to
>>>provide SC semantics)
>>
>>The JMM doesn't promise this. 
> 
> 
> Uhmm. This JSR-133 FAQ entry
> 
> http://www.cs.umd.edu/users/pugh/java/memoryModel/jsr-133-faq.html#volatile
> 
> <quote>
> 
> What does volatile do?
> 
> Volatile fields are special fields which are used for communicating 
> state between threads. Each read of a volatile will see the last 
> write to that volatile by any thread; in effect, 

This is probably worded well enough for a FAQ, since it relies
on what "last" means. The intuitive meaning of "last" is good
enough to convey meaning in most cases; in other cases you have
to read the spec.

-Doug






More information about the cpp-threads mailing list