Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-08-27 08:29:47


Alexander Terekhov wrote:

> Consider also that
>
> "Load Seq_Cst: MOV (from memory)
> Store Seq Cst: (LOCK) XCHG // alternative: MOV (into memory),MFENCE"
>
> is an overkill for typical use cases...

But that's not a problem because everyone who understands should use
explicit constraints, even if they happen to be memory_order_seq_cst.
Relying on the SC default is bad practice because it can (and, to be on the
safe side, should) be interpreted to mean that the author just hasn't
figured out the minimum requirements.


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