Boost logo

Boost :

Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-12-19 07:17:09


On Wed, Dec 19, 2012 at 4:00 PM, Peter Dimov <lists_at_[hidden]> wrote:
> Andrey Semashev wrote:
> On Wed, Dec 19, 2012 at 3:27 PM, Peter Dimov <lists_at_[hidden]> wrote:
>>
>> > Where (file/line) is the mfence that can be removed?
>>
>> atomic/detail/windows.hpp, line 174.
>>
>> Comparing it to gcc-x86.hpp, the gcc implementation indeed doesn't
>> have it, so I'm probably right.
>
>
> It doesn't seem necessary, but it's only used at one place, in
> atomic_flag::clear.

Ok, thank you, I will correct that.

> 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?


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