Boost logo

Boost :

Subject: Re: [boost] [atomic] comments
From: Helge Bahmann (hcb_at_[hidden])
Date: 2011-11-01 09:17:11

On Tuesday 01 November 2011 14:06:46 Peter Dimov wrote:
> Helge Bahmann wrote:
> > the standard says "should" not "must" -- the gcc guys have not made this
> > decision without good reasons, and I agree with these reasons
> It says "should" but only for the lock-free case:
> [ Note: Operations that are lock-free should also be address-free. That is,
> atomic operations on the same memory location via two different addresses
> will communicate atomically. The implementation should not depend on any
> per-process state. This restriction enables communication by memory that is
> mapped into a process more than once and by memory that is shared between
> two processes. —end note ]

and boost.atomic provides precisely that -- if the operations are lock-free,
they are process-state free

Best regards

Boost list run by bdawes at, gregod at, cpdaniel at, john at