Commit a10b664e by Jonathan Wakely Committed by Jonathan Wakely

Fix recent regression in __atomic_add_dispatch

	* include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
	throw() with _GLIBCXX_NOTHROW.
	(__atomic_add_dispatch): Return after performing atomic increment.

From-SVN: r273167
parent ef2df516
2019-07-06 Jonathan Wakely <jwakely@redhat.com>
* include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
throw() with _GLIBCXX_NOTHROW.
(__atomic_add_dispatch): Return after performing atomic increment.
2019-07-05 Jonathan Wakely <jwakely@redhat.com> 2019-07-05 Jonathan Wakely <jwakely@redhat.com>
* include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add) * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
......
...@@ -55,10 +55,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -55,10 +55,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
#else #else
_Atomic_word _Atomic_word
__exchange_and_add(volatile _Atomic_word*, int) throw (); __exchange_and_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW;
void void
__atomic_add(volatile _Atomic_word*, int) throw (); __atomic_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW;
#endif #endif
inline _Atomic_word inline _Atomic_word
...@@ -92,7 +92,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -92,7 +92,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ {
#ifdef __GTHREADS #ifdef __GTHREADS
if (__gthread_active_p()) if (__gthread_active_p())
__atomic_add(__mem, __val); {
__atomic_add(__mem, __val);
return;
}
#endif #endif
__atomic_add_single(__mem, __val); __atomic_add_single(__mem, __val);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment