[cpp-threads] modes
Peter Dimov
pdimov at mmltd.net
Sat May 7 20:20:36 BST 2005
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?
More information about the cpp-threads
mailing list