------- Comment #3 from bkoz at gcc dot gnu dot org 2009-06-18 00:33 -------
Jonathan, you are right. These assertions are all backwards. I see this hitting the following members: load store compare_exchange_strong I should have done tests for this, obviously. Ouch. Now you've done this for me, so yes proceed please. I'm still not sure that this kind of debug mode only error handling is correct but it seems like an approach that is vaguely familiar from other parts of the library. So at least usage is consistent, even if the original implementation was plain wrong.... There are many problems with memory ordering in the atomics2 implementation. It is known to be incorrect and incomplete, as the saying goes. The goal was to start experimenting with compliler builtins assuming x86_64 hardware and see how far we got, what kind of compiler intrinsics we needed first, how we test this stuff, etc etc. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40297