diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2007-05-24 22:18:07 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-05-24 22:18:07 +0000 |
commit | 8679a8ef55e0969e7cbe633873dff15194c20438 (patch) | |
tree | 3bfa6a470bd6be1ca4555501134261c037862558 /libstdc++-v3/include | |
parent | 88d1c2ad47c6c456d90c349f8dc3ec680514cdb8 (diff) | |
download | gcc-8679a8ef55e0969e7cbe633873dff15194c20438.zip gcc-8679a8ef55e0969e7cbe633873dff15194c20438.tar.gz gcc-8679a8ef55e0969e7cbe633873dff15194c20438.tar.bz2 |
concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
2007-05-24 Paolo Carlini <pcarlini@suse.de>
* include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
From-SVN: r125044
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/ext/concurrence.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h index 6efb2a6..de4934c 100644 --- a/libstdc++-v3/include/ext/concurrence.h +++ b/libstdc++-v3/include/ext/concurrence.h @@ -53,9 +53,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // the current configuration. static const _Lock_policy __default_lock_policy = #ifdef __GTHREADS - // NB: This macro doesn't actually exist yet in the compiler, but is - // set somewhat haphazardly at configure time. -#ifdef _GLIBCXX_ATOMIC_BUILTINS +#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \ + && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) _S_atomic; #else _S_mutex; @@ -63,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #else _S_single; #endif - + // NB: As this is used in libsupc++, need to only depend on // exception. No stdexception classes, no use of std::string. class __concurrence_lock_error : public std::exception |