On Mar 3, 2014, at 22:59, Richard Smith wrote:

> OK, so... the standard does imply that the 'expected' access is non-atomic, 
> which means that the case described in PR18899 already contains a data race 
> (between the load of 'expected' in the __atomic_compare_exchange and the 
> hypothesized store in another thread)

The case I described there doesn't contain a race, because the memory location 
in question isn't visible to any other threads until the compare_exchange 
succeeds. The load from 'expected' happens-before the successful write, which 
synchronizes-with any load from the atomic in another thread that makes the 
memory location of 'expected' visible to another thread.

Sebastian
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to