(__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 ().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146576
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
_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;
}
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
_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
_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;
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
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;
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;
_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;
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
_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}"
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));
// 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;
// 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;
_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;
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.
_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;
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"
_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;
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
#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;
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;
_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;
void
__attribute__ ((__unused__))
- __atomic_add(volatile _Atomic_word* __mem, int __val)
+ __atomic_add(volatile _Atomic_word* __mem, int __val) throw ()
{
_Atomic_word __tmp;
_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
_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
#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