Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-26 14:26:15


on Fri Aug 26 2011, Alexander Terekhov <terekhov-AT-web.de> wrote:

> Dave Abrahams wrote:
> [...]
>> IIUC, using mutexes in the implementation of C++0x atomics has always
>> been considered an available choice for implementors. ...
>
> Lock-free atomics can not be implemented using mutexes. Lock-free SC
> atomics need a heavy-weight 'hwsync' on PowerPC/PPC (mutexes don't need
> 'hwsync').

Thanks for educating me.

> Nobody needs atomics implemented using mutexes because locking can be
> done more efficiently on higher level.

Well, the idea is to allow code using atomics to run at all (if
suboptimally) on platforms that don't support hardware atomics for the
data type in question.

-- 
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