This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: notes on current atomics config and usage


Mark Mitchell wrote:

Yes.  Assuming you want to support both 386 and 486+ in libstdc++ (and I
think you should), we need (a) a feature macro (defined by the compiler,
or by libstdc++ at configure-time) to see if the builtins are available,
(b) libstdc++ code to test that feature macro.

Then, the compiler default is just a detail; if the user is building a
multilib with -march=i386, then you get the slow way; if they're
building with -march=i486, then you get the fast way.

Ok.

As a first step in this large project, when I will be back from a few days of vacations, I will start on implementing __GCC_ATOMIC_BUILTINS: if I remember correctly should not be a very big deal, I understand you are in favor of adding the facility, and, last but not least, even alone would be of great help for code not calling into the library, like, for example, the lockfree shared_ptr currently in the making. In such cases there are no interoperability issues between user code and library code and we can win very easily!

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]