|
Boost : |
Subject: Re: [boost] [interprocess] atomic_write32 on GCC/x86/x68_64 lacks memory barrier
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-08-08 11:11:31
El 08/08/2014 14:28, Lars Hagström escribió:
> So I propose that atomic_write32 should be implemented using atomic_cas32.
> Or indeed that Boost.Atomic should be used instead, which is more work,
> obviously.
[CC-ing Andrey]
I'd like to use Boost.Atomic (assuming Boost.Atomic can be used in C++03
mode). At least in all platforms where Boost.Atomic is available. The
Boost.Interprocess atomics are broken and I don't have the skills to
write correct code.
I'd like to use a header-only solution but I see that's not currently
possible with Boost.Atomic. I'd only use 32 bit atomic operations and
only in platforms where those are lock-free, as it's the case now wirh
Interprocess (we can't fallback to std::mutex-es and that's perfectly
acceptable).
Maybe it's a good task for Boost 1.57. Andrey, do you think porting to
Boost.Atomic is a good idea? I don't know if Boost.Atomic supports all
platforms Interprocess supports now (see
www.boost.org/doc/libs/release/boost/interprocess/detail/atomic.hpp for
details).
Best,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk