On 11/04/2011 02:14 PM, Jeff Law wrote:
These are the changes to libstdc++ to make use of the new atomics.
I changed the files to use the new atomics, and bkoz did a
shuffling of the include file layout to better suit the new c++
approach.

previously, libstdc++ provided a locked implementation in
atomic_0.h with the theory that eventually it would be used.  The
new scheme involves leaving non-lock-free implementations to an
external library. This involved removing the old lock
implementation and restructuring things now that multiple
implementation dont have to be supported.   SO a lot fo this is
churn... 2 include files deleted and one merged into another one..
Is there an ABI/API impact to all this churn?  Or was the atomic_0.h
stuff never used?  Was it an exposed API or strictly internal?  I get
the impression that is_lock_free wasn't ever defined, which is
probably good in this context.

Given these are primarily Benjamin's changes, I'm going to defer to
his wisdom :-)    If he doesn't chime in, ping him directly.
well, actually, the way it was setup, I don't think it was ever used. Things defaulted to using the lockfree __sync routines, and if you tried to do something that didn't map to one of those, you got either a compiler error (in the case of non-integral classes), or external __sync calls. It was in a transitional state, and never fully flushed out. At least thats was my impression when I started trying to work with it to get full support. I dont think you could trigger the code in atomic_0.h without changing the compiler/headerfiles yourself. At least I dont think so. Well, It may have been possible by explicitly specifying the __atomic0 namespace with baseclasses... Im not sure. I'll let bkoz deal with answering that :-) Since support was experimental, I dont think anyone was suppose to count on it anyway :-P

I believe that any atomic integral that worked before will work today with these changes and without an external library... With the addition of the forthcoming atomic library (which is not a part of gcc) you should be able to compile and run anything, including arbitrary user PODs. WIth any luck at all, the atomic library ABI I set up is defined enough now to continue to function as is in future releases.

Andrew

Reply via email to