[cpp-threads] std::atomic<> in acquire-release mode and write atomicity

Alexander Terekhov alexander.terekhov at gmail.com
Tue Dec 16 01:46:32 GMT 2008


On Tue, Dec 16, 2008 at 1:00 AM, Paul E. McKenney
<paulmck at linux.vnet.ibm.com> wrote:
[...]
> I agree that std::atomic<> in acquire-release mode does not support IRIW.
> Whether this is due to a failure to totally order stores or a failure
> to provide cumulativity to loads is a philosophical point, at least from
> what I can tell.  ;-)

How about

P1: Y = 1;
P2: if( Y == 1 ) { Z = 1; }
P3: if( Z == 1 ) { assert( Y == 1 ); }

?

regards,
alexander.



More information about the cpp-threads mailing list