On 3 Dec 2014 at 23:52, Stephan T. Lavavej wrote:
[Niall Douglas]
I think the Intel paper was referring to MSVC only, which is an unusual compiler in that its atomics all turn into InterlockedXXX functions irrespective of what you ask for. In other words, all seq_cst.
Absolutely untrue for VC-ARM. Also untrue for VC 2015 x86/x64, where <atomic> avoids Interlocked machinery when an ordinary load/store with a compiler barrier will suffice due to the strength of the architecture's guarantees. (The versions are blurring together, so I forget when we made this change.)
Which would explain why a volatile read has no difference to an atomic consume read, which is an obvious duh on my part. Thanks for the catch Stephan. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/