[cpp-threads] Failed compare-and-swap

Lawrence Crowl Lawrence at Crowl.org
Mon Jul 30 18:57:25 BST 2007


On 7/29/07, Peter Dimov <pdimov at mmltd.net> wrote:
> Lawrence Crowl wrote:
> > Are the synchronization semantics of a failed compare-and-swap
> > any different from those of a successful one?
>
> I think that a failed CAS should not be required to perform any memory
> synchronization.

At the very least, the memory model needs to say something about
any value read.  Should we say it is equivalent to load relaxed?
(I'm not sure how that plays with the folks that want to program
to sequential consistency.)

-- 
Lawrence Crowl



More information about the cpp-threads mailing list