Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-27 13:52:00


on Sat Aug 27 2011, Gottlob Frege <gottlobfrege-AT-gmail.com> wrote:

> There is no "synchronizes with" (standard's wording) because
> synch-with requires thread 2 to *read* the value written into the
> atomic by thread 1. We have no reads here - no if statement - so
> reordering doesn't matter.
> I don't think the standard disallows the reordering of i and j, even
> if they are atomics.

IIUC from the point of view of programs without undefined behavior, the
standard disallows reordering in both cases.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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