Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-12-19 17:02:49
On Wed, Dec 19, 2012 at 9:34 PM, Peter Dimov <lists_at_[hidden]> wrote:
> Incidentally, the mfence in gcc-x86.hpp line 86, in
> platform_fence_after_load, is unnecessary as well, if I'm not mistaken. The
> semantics of memory_order_seq_cst are (intentionally) such that it doesn't
> require fences on the load side, as long as all seq_cst stores or
> modifications are locked or done with xchg (which has an implicit lock
> prefix). This also seems to apply to windows.hpp, line 203.
I have committed my fixes as well as removing mfence in
platform_fence_after_load. I've also added pause instructions to spin
loops to optimize performance and CPU power consumption.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk