]> 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 c05f611d33a8039cc5d1a95243e629df63f28c89..0fecc459bfa2961b47fd21a2846e2e3e4c6ae386 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*- Exception handling routines for Transactional Memory.
-// Copyright (C) 2009-2016 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);
     }
 
-#if __GCC_ATOMIC_INT_LOCK_FREE > 1
-  if (__atomic_sub_fetch (&h->referenceCount, 1, __ATOMIC_ACQ_REL) == 0)
-#endif
+  if (__gnu_cxx::__eh_atomic_dec (&h->referenceCount))
     __cxa_free_exception (h + 1);
 }