Patchwork [v3] eh_tm fixup atomic bulitin

login
register
mail settings
Submitter Benjamin Kosnik
Date Dec. 20, 2011, 12:03 a.m.
Message ID <20111219160357.59ca8994@shotwell>
Download mbox | patch
Permalink /patch/132338/
State New
Headers show

Comments

Benjamin Kosnik - Dec. 20, 2011, 12:03 a.m.
Remove use of _GLIBCXX__ATOMIC_BUILTINS_4 as it's no longer ever
defined...

Also, random fixup for "make check-performance."

tested x86/linux

-benjamin

Patch

2011-12-19  Benjamin Kosnik  <bkoz@redhat.com>

        * testsuite/performance/25_algorithms/search_n.cc: Disambiguate
        local variable.

2011-12-19  Benjamin Kosnik  <bkoz@redhat.com>

	    * libsupc++/eh_tm.cc (free_any_cxa_exception): Use
	    __GCC_ATOMIC_INT_LOCK_FREE, not _GLIBCXX_ATOMIC_BUILTINS_4.


diff --git a/libstdc++-v3/libsupc++/eh_tm.cc b/libstdc++-v3/libsupc++/eh_tm.cc
index a646102..1df8644 100644
--- a/libstdc++-v3/libsupc++/eh_tm.cc
+++ b/libstdc++-v3/libsupc++/eh_tm.cc
@@ -1,5 +1,5 @@ 
 // -*- C++ -*- Exception handling routines for Transactional Memory.
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2011 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -45,7 +45,7 @@  free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#ifdef _GLIBCXX_ATOMIC_BUILTINS_4
+#if __GCC_ATOMIC_INT_LOCK_FREE > 1
   if (__sync_sub_and_fetch (&h->referenceCount, 1) == 0)
 #endif
     __cxa_free_exception (h + 1);