I've been working on GCC's C++11 atomic implementation. In discussions
with Lawrence, I've recently discovered a fundamental change in what
libstdc++-v3 is likely to provide as far as an implementation.
Previously, header files provided a choice between a locked or a
lock-free implementation, preferring the lock-free version when
available on the architecture and falling back to the locked version in
other cases.
Now the thought is to provide lock-free instructions when possible, and
fall back to external function calls the rest of the time. These would
then be resolved by an application or system library.
If proceeding with that change, it would be convenient to make the same
calls that other implementations are going to use, allowing OS or
application providers to simply provide a single library with atomic
routines that can be used by multiple C++11 compilers.
Since GCC 4.7 stage 1 is going to end shortly and it would be nice to
get the cxx-mem-model branch integrated, I quickly wrote up what the
current plan for the branch is regarding these external calls and such
and brought up a couple of issues. Its located in the gcc wiki at:
http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
Its my first cut at it, so hopefully its mostly correct :-)
If anyone has any interest or input on this subject, the sooner it is
brought up the better!
Andrew