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


Hi Benjamin,

I'd like to move to configure-time testing for atomics, instead of
hard coded lists of platforms that work. In general, this approach
tends to age better... see patch.


Indeed, I agree it's a nice idea. I'm only wondering whether the check itself, in acinclude.m4 could be a little simpler, taking inspiration from libgomp... Or the additional complexity is related to the annoying i386 (vs i486 and newer) thing?!?

Anyway. A real, unsettled meta-question is the use of atomic ops in
inline functions. This seems fine, except for the x86 quandary.

Damn you, i386.


Yes! ;)

In theory, this really does penalize every other non-x86 linux
platform, however.


Well, that's not true: indeed, when _GLIBCXX_HAVE_ATOMIC_BUILTINS is defined we *do* inline the calls (for powerpc, ia64, s390, alpha). As a matter of fact, I introduced the
_GLIBCXX_ATOMIC_BUILTINS macro for this very purpose...


Paolo.


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