Boost logo

Boost :

Subject: Re: [boost] [atomic] Probable documentation issue: how do we knowatomic is safe and/or efficient?
From: Peter Dimov (lists_at_[hidden])
Date: 2013-12-24 09:29:55


John Maddock wrote:
> I'm sure the answer to (a) is that it is correct, but I was surprised that
> atomic<int> relied on the volatile modifier for thread safe load/stores on
> MSVC, I had assumed that something more than that would have been
> required, but I know I'm out of date on this stuff!

"volatile" was changed in VC++ 8.0 to guarantee acquire/release semantics,
then changed back in 2012 to only do so when /volatile:ms is active, which
it is by default, except on ARM.

http://msdn.microsoft.com/en-us/library/12a04hfd.aspx


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk