Boost logo

Boost :

Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Peter Dimov (lists_at_[hidden])
Date: 2012-12-19 07:28:57


Andrey Semashev wrote:
> > All uses of READ_BARRIER or WRITE_BARRIER seem wrong, though.
> > READ_WRITE_BARRIER is needed in all places where these are used.
>
> Why? The intention was to prevent outer reads and writes being
> reordered with the atomic op. Did I miss something?

The acquire/release semantics are not specific to reads or writes. An
acquire load should prevent subsequent writes from being reordered so as to
precede it, and a read barrier doesn't do that, I think.


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