]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/libsupc++/eh_tm.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / libsupc++ / eh_tm.cc
index a64610283ff7c87ca6a8369890a09c172c10dd99..0fecc459bfa2961b47fd21a2846e2e3e4c6ae386 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*- Exception handling routines for Transactional Memory.
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009-2020 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -24,6 +24,7 @@
 
 #include <cstdlib>
 #include "unwind-cxx.h"
+#include "eh_atomics.h"
 
 using namespace __cxxabiv1;
 
@@ -45,9 +46,7 @@ free_any_cxa_exception (_Unwind_Exception *eo)
       __cxa_free_dependent_exception (dep);
     }
 
-#ifdef _GLIBCXX_ATOMIC_BUILTINS_4
-  if (__sync_sub_and_fetch (&h->referenceCount, 1) == 0)
-#endif
+  if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
     __cxa_free_exception (h + 1);
 }