Subject: Re: [boost] [spinlock] Spin on volatile read, NUMA fairness?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-12-04 08:21:55
On 3 Dec 2014 at 23:52, Stephan T. Lavavej wrote:
> [Niall Douglas]
> > I think the Intel paper was referring to MSVC only, which is an
> > unusual compiler in that its atomics all turn into InterlockedXXX
> > functions irrespective of what you ask for. In other words, all
> > seq_cst.
> Absolutely untrue for VC-ARM. Also untrue for VC 2015 x86/x64, where
> <atomic> avoids Interlocked machinery when an ordinary load/store with a
> compiler barrier will suffice due to the strength of the architecture's
> guarantees. (The versions are blurring together, so I forget when we
> made this change.)
Which would explain why a volatile read has no difference to an
atomic consume read, which is an obvious duh on my part. Thanks for
the catch Stephan.
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk