Re: [cxx-mem-model] C++ atomic tests (synchronized and relaxed)

2011-04-05 Thread Aldy Hernandez
Notice the store of *after* the store to . I consider this a bug and have put this on my laundry list. Seems plausible, though I don't know the details of the x86_64 memory model well enough to be sure that it would be possible to observe this reordering. But then, if your test fails I guess it

Re: [cxx-mem-model] C++ atomic tests (synchronized and relaxed)

2011-04-04 Thread Jason Merrill
On 04/04/2011 01:11 PM, Aldy Hernandez wrote: 1. Synchronized atomic load/stores: atomic_int atomi; long double j; Thread 1: j = 13.0; atomi.store(1); Thread 2: atomi.load(); As I understand it, the load/stores have acquire/release semantics, so the store to must happen before the store to .