Subject: Re: [boost] [interprocess] (OS X) waiting on condition variable = CPU 100% + fans running loud
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-01-08 11:32:18
> Clang has std::atomic though, doesn't it?
probably not unless you enable c++11. clang/c++11/osx does not work on
10.6 (it does not ship a c++11 compliant standard library) and
clang/c++11/linux doesn't have a working std::thread implementation.
> Actually, it seems to support the even better __atomic intrinsics:
again, this requires gcc-4.7 ... what about people who are stuck at an
older compiler? apple/gcc is probably still shipping 4.2, which does not
even implement __sync primitives in a portable manner ...
of course, if the compiler implements std::atomic, there is absolutely
no need for boost::atomic in the first place ... the whole point is to
provide a compatibility layer to provide c++11-style atomics for old
compilers, that don't support c++11 atomics ... which, btw is one of the
reason why the original author decided to use inline assembly instead of
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk