Boost logo

Boost :

Subject: Re: [boost] [locale] review part 2.2: source
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-04-18 08:42:22


Artyom wrote:

> Mutex acquisition and release is full memory barrier.

No, they are only guaranteed to have acquire and release semantics,
respectively. Double-checked locking is broken even if they're full barriers
though. That said, MSVC from some version onwards, I forget which,
guarantees that volatile reads have acquire semantics and that volatile
writes have release semantics, and under this assumption, the code is
correct.


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