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
This commit is contained in:
parent
ef2df51671
commit
a10b664eb7
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
|
||||
|
|
|
@ -55,10 +55,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{ __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
|
||||
#else
|
||||
_Atomic_word
|
||||
__exchange_and_add(volatile _Atomic_word*, int) throw ();
|
||||
__exchange_and_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW;
|
||||
|
||||
void
|
||||
__atomic_add(volatile _Atomic_word*, int) throw ();
|
||||
__atomic_add(volatile _Atomic_word*, int) _GLIBCXX_NOTHROW;
|
||||
#endif
|
||||
|
||||
inline _Atomic_word
|
||||
|
@ -92,7 +92,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
#ifdef __GTHREADS
|
||||
if (__gthread_active_p())
|
||||
__atomic_add(__mem, __val);
|
||||
{
|
||||
__atomic_add(__mem, __val);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
__atomic_add_single(__mem, __val);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue