[cpp-threads] modes
    Doug Lea 
    dl at cs.oswego.edu
       
    Sat May  7 20:31:34 BST 2005
    
    
  
Peter Dimov wrote:
> Doug Lea wrote:
> 
>>>You seem to be saying that:
>>>
>>>- programs that have no data races are sequentially consistent;
>>
>>We define what is a race.
> 
> 
> I know. It doesn't matter. Programs involving unconstrained atomics aren't 
> sequentially consistent. (Even constrained ld.acq and st.rel atomics - x86 
> processor ordering, SPARC TSO, IA64 volatiles - aren't SC, see the example I 
> gave earlier.) If you define them to be race-free, your model no longer 
> offers SC for race-free code. Therefore, since SC for race-free code is 
> regarded as a desirable property of the MM, they must not be race-free. QED.
> 
> So I'm back to where I started. What specification describes the behavior of 
> these programs if our memory model pretends that they do not exist? 
> 
> 
Good point. Assuming we keep it, atomicX.ordinary_read must
be different than a read of an ordinary_var in that we give it
semantics. Which would make this all more similar to JMM (where
we provide semantics for all programs).
Hans will not be happy that I think that's what we will be forced
to do unless anyone sees a way out.
-Doug
    
    
More information about the cpp-threads
mailing list