On Mon, 23 May 2011, Aldy Hernandez wrote:

> This is a patch implementing builtins for an atomic exchange with full,
> acquire, and release memory barrier semantics.  It is similar to
> __sync_lock_test_and_set(), but the target does not have the option of
> implementing a reduced functionality of only implementing a store of 1.  Also,
> unlike __sync_lock_test_and_set(), we have all three memory barrier variants.

What's the reason you've implemented three variants, rather than six (the 
C1X/C++0X atomics have six memory order values) or one built-in function 
taking a memory order parameter?  More generally, what is the underlying 
design here for how built-in functions should cover the whole of the new 
atomics functionality in C1X and C++0X?

Adding functions to libgcc-std.ver seems premature in the absence of any 
library implementations of them.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to