[concurrency-interest] Semantics of compareAndSwapX
Andrew Haley
aph at redhat.com
Thu Feb 20 10:35:23 EST 2014
On 02/20/2014 10:25 AM, David Holmes wrote:
> The volatile-read followed by volatile-write implicit in the CAS precludes
> any accesses before the cas appearing after, or vice-versa. I would appeal
> intuitively to "roach motel" semantics but Aleksey would jump on me. ;-)
True enough, but that does not preclude, say, a write access to am
unrelated location appearing after the volatile read but before the
volatile write. Does that matter? I guess it must not, but it does
mean that the CAS may not be strictly atomic.
Andrew.
More information about the Concurrency-interest
mailing list