mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 23:45:20 +08:00
* include/ext/atomicity.h
(__exchange_and_add, __atomic_add): Mark throw (). * config/os/aix/atomicity.h * config/os/aix/atomicity.h * config/os/irix/atomicity.h * config/cpu/cris/atomicity.h * config/cpu/m68k/atomicity.h * config/cpu/hppa/atomicity.h * config/cpu/sparc/atomicity.h * config/cpu/i386/atomicity.h * config/cpu/i486/atomicity.h * config/cpu/sh/atomicity.h * config/cpu/generic/atomicity_mutex/atomicity.h * config/cpu/generic/atomicity_builtins/atomicity.h (__exchange_and_add, __atomic_add): Mark throw (). From-SVN: r146576
This commit is contained in:
parent
f1eea13514
commit
09f2a1e440
@ -1,3 +1,21 @@
|
||||
2009-04-21 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* include/ext/atomicity.h
|
||||
(__exchange_and_add, __atomic_add): Mark throw ().
|
||||
* config/os/aix/atomicity.h
|
||||
* config/os/aix/atomicity.h
|
||||
* config/os/irix/atomicity.h
|
||||
* config/cpu/cris/atomicity.h
|
||||
* config/cpu/m68k/atomicity.h
|
||||
* config/cpu/hppa/atomicity.h
|
||||
* config/cpu/sparc/atomicity.h
|
||||
* config/cpu/i386/atomicity.h
|
||||
* config/cpu/i486/atomicity.h
|
||||
* config/cpu/sh/atomicity.h
|
||||
* config/cpu/generic/atomicity_mutex/atomicity.h
|
||||
* config/cpu/generic/atomicity_builtins/atomicity.h
|
||||
(__exchange_and_add, __atomic_add): Mark throw ().
|
||||
|
||||
2009-04-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR libstdc++/39835
|
||||
|
@ -27,7 +27,7 @@
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
int __tmp;
|
||||
_Atomic_word __result;
|
||||
@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
}
|
||||
|
||||
void
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __exchange_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -34,12 +34,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ return __sync_fetch_and_add(__mem, __val); }
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __sync_fetch_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -44,7 +44,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
__gnu_cxx::__scoped_lock sentry(get_atomic_mutex());
|
||||
_Atomic_word __result;
|
||||
@ -55,7 +55,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __exchange_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -43,7 +43,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
int
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word result;
|
||||
int tmp;
|
||||
@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
int tmp;
|
||||
volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock;
|
||||
|
@ -39,7 +39,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
register _Atomic_word __result, __tmp = 1;
|
||||
|
||||
@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __exchange_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -28,7 +28,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
register _Atomic_word __result;
|
||||
__asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
|
||||
@ -39,7 +39,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
__asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
|
||||
: "=m" (*__mem) : "ir" (__val), "m" (*__mem));
|
||||
|
@ -32,7 +32,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
// These variants support compare-and-swap.
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
register _Atomic_word __result = *__mem;
|
||||
register _Atomic_word __temp;
|
||||
@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
// Disable interrupts, which we can do only from supervisor mode.
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __result;
|
||||
short __level, __tmpsr;
|
||||
@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __result;
|
||||
|
||||
@ -119,7 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
// Careful: using add.l with a memory destination is not
|
||||
// architecturally guaranteed to be atomic.
|
||||
|
@ -33,7 +33,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __result;
|
||||
|
||||
@ -54,7 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
asm("0:\n"
|
||||
"\tmovli.l\t@%1,r0\n"
|
||||
@ -84,7 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
__gnu_cxx::__scoped_lock sentry(atomic_mutex);
|
||||
_Atomic_word __result;
|
||||
@ -95,7 +95,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __exchange_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -30,7 +30,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
#ifdef __arch64__
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __tmp1, __tmp2;
|
||||
_Atomic_word __val_extended = __val;
|
||||
@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __tmp1, __tmp2;
|
||||
_Atomic_word __val_extended = __val;
|
||||
@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __result, __tmp;
|
||||
|
||||
@ -100,7 +100,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{
|
||||
_Atomic_word __tmp;
|
||||
|
||||
|
@ -42,12 +42,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add (volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ return ::fetch_and_add(const_cast<atomic_p>(__mem), __val); }
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add (volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ (void) ::fetch_and_add(const_cast<atomic_p>(__mem), __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -28,11 +28,11 @@
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
_Atomic_word
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
|
||||
__exchange_and_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ return (_Atomic_word) test_then_add((unsigned long*) const_cast<_Atomic_word*>(__mem), __val); }
|
||||
|
||||
void
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val)
|
||||
__atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
|
||||
{ __exchange_and_add(__mem, __val); }
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -51,11 +51,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
#else
|
||||
_Atomic_word
|
||||
__attribute__ ((__unused__))
|
||||
__exchange_and_add(volatile _Atomic_word*, int);
|
||||
__exchange_and_add(volatile _Atomic_word*, int) throw ();
|
||||
|
||||
void
|
||||
__attribute__ ((__unused__))
|
||||
__atomic_add(volatile _Atomic_word*, int);
|
||||
__atomic_add(volatile _Atomic_word*, int) throw ();
|
||||
#endif
|
||||
|
||||
static inline _Atomic_word
|
||||
|
Loading…
Reference in New Issue
Block a user