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