
Hello Helge, I am trying to use Boost.Atomic in my project but am experiencing the following two problems: - boost/atomic/memory_order.hpp: enum memory_order is redeclared from boost/memory_order.hpp (1.37) + however boost/memory_order.hpp does not define memory_order_consume, from a quick glance however that enum value does not seem to be used (it appears in some switch statements but only as a fallthrough) so I simply removed boost/atomic/memory_order.hpp and removed all uses of memory_order_consume - boost::atomic<T>::atomic() and boost::atomic<T>::atomic(T v) declare the variable "verify_valid_atomic_integral" but never use it which breaks -Werror + to fix this I simply added the line "(void)verify_valid_atomic_integral;" to both constructors I have not tested the changes, beyond testing that it compiles. A patch is attached. With kind regards, Mikael Olenfalk On Sun, Nov 29, 2009 at 11:49 PM, Helge Bahmann <hcb@chaoticmind.net> wrote:
Hello,
as promised I have started extracting an atomic operations library. Current state is available at:
http://www.chaoticmind.net/~hcb/projcets/boost.atomic
It implements boost::atomic<TYPE> which faithfully mimics std::atomic<TYPE> as specified in the C++0x draft standard. As allowed by the standard, operations transparently fall back to locking when the underlying architecture does not support the requested operation, so the library already contains a "fallback" implementation that works an all platforms (using mutex from boost::thread).
It currently natively supports gcc/x86, gcc/powerpc and gcc/alpha (I can vouch for the correctness of the implementations on these targets). It contains some entirely untested support for building implementations from CAS operations on other systems (e.g. _InterlockedCompareExchange on win), so I would greatly appreciate any feedback if it works/doesn't on any particular platform.
There is some preliminary documentation, but not in boostdoc format -- after unsuccessfully struggling with bjam/boostbook & friends for a few hours I simply gave up and reverted to trusty old doxygen :(
Is there any step-by-step guide on how to create, build and document a new library? I could really use that as the boost build and documentation system is pretty alien to an autotools-accustomed guy like me.
Best regards Helge _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost