diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-02-10 18:49:14 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-02-10 18:49:14 +0000 |
commit | 4635c5f6b4bec3e2827f8a70fdd98c4aefff0495 (patch) | |
tree | 9873556598ba4f3eaa73cec811b9960b19987620 /ACE/ace/config-g++-common.h | |
parent | 85964e845d322986faeacb20c0399dcf4107eef4 (diff) | |
download | ATCD-4635c5f6b4bec3e2827f8a70fdd98c4aefff0495.tar.gz |
Wed Feb 10 18:39:30 UTC 2010 Martin Corino <mcorino@remedy.nl>
* ace/config-g++-common.h:
Added logic to detect (usable) support for GCC builtin __sync_XXX
atomic op functions.
* ace/Atomic_Op.h:
* ace/Atomic_Op.inl:
Changed autodetection for GCC builtin atomic ops so it will
only be used when really wanted.
Removed include for stdatomic.h because that has nothing to do with
the __sync_XXX builtins but rather with a *proposed* atomic op
implementation for the C++1x standard. The __sync_XXX builtins are
truly intrinsic, i.e. no header files involved.
Diffstat (limited to 'ACE/ace/config-g++-common.h')
-rw-r--r-- | ACE/ace/config-g++-common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index 86ee5673c84..bafc57bf1d5 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -149,6 +149,14 @@ # endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */ #endif /* __GNU__ >= 4 */ +// GCC >= 4.1 provides __sync_XXXX builtins for use in atomic operations +// although the builtins are provided globally they are not supported on all platforms +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) +# if (defined (__powerpc__) && defined (__PPU__)) +# define ACE_HAS_GCC_ATOMIC_BUILTINS 1 +# endif +#endif + #if defined (ACE_HAS_GNU_REPO) // -frepo causes unresolved symbols of basic_string left- and // right-shift operators with ACE_HAS_STRING_CLASS. |