Boost logo

Boost :

Subject: Re: [boost] [interprocess] atomic_write32 on GCC/x86/x68_64 lacks memory barrier
From: Peter Dimov (lists_at_[hidden])
Date: 2014-08-11 10:19:11


Lars Hagström wrote:
> Hmm, should I add a fence to the Windows atomic_read32 variant too?
> Reading the Boost.Atomics code it looks like it puts a _ReadWriteBarrier
> in there...

That would be a good idea as well. Some MSVC versions give volatile reads
acquire semantics, and some do not, so it's safer to have the barrier.


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