]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
authorPaolo Carlini <paolo@gcc.gnu.org>
Thu, 24 May 2007 22:18:07 +0000 (22:18 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 24 May 2007 22:18:07 +0000 (22:18 +0000)
2007-05-24  Paolo Carlini  <pcarlini@suse.de>

* include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.

From-SVN: r125044

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/concurrence.h

index 96da24af9995f6df7e5c462d473d8f72cc0e5813..7e5513a89c1a7cefefba245778a1d944cbe668cf 100644 (file)
@@ -1,4 +1,8 @@
-2007-05-23  Steve Ellcey  <sje@cup.hp.com>
+2007-05-24  Paolo Carlini  <pcarlini@suse.de>
+
+       * include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
+
+2007-05-24  Steve Ellcey  <sje@cup.hp.com>
 
        * Makefile.in: Regenerate.
        * configure: Regenerate.
index 6efb2a6be08c8cee4ed109018f1563327ff8a0c9..de4934c63c5df78ddcd56494bff007dcf0a75ff2 100644 (file)
@@ -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