Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-12-19 07:09:55
On Wed, Dec 19, 2012 at 3:40 PM, Tim Blechmann <tim_at_[hidden]> wrote:
> andrey & peter,
> could you review this patch?
As I understand, hardware fences in platform_fence_before and
platform_fence_after are not needed.
lfence is a no-op for normal memory, as far as I know, so it can be
removed as well.
The hardware fences in platform_fence_before_store and
platform_fence_after_store are not needed considering how store()
operations are implemented. If user requests seq_cst then store is
implemented as an atomic exchange() which is a full fence itself.
Otherwise the store should be synchronized only with the atomic
variable itself, and on x86 a regular store with a compiler barrier is
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk