atomicity.h (_Atomic_word): Make it a signed type.

* config/os/irix/bits/atomicity.h (_Atomic_word): Make it a
	signed type.
	(__exchange_aand_add): Adjust accordingly.
	(__atomic_add): Likewise.

From-SVN: r37209
This commit is contained in:
Mark Mitchell 2000-11-02 20:31:59 +00:00 committed by Mark Mitchell
parent 04e3be98eb
commit 7d3b1e8d0e
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,10 @@
Thu Nov 2 10:11:45 2000 Mark P Mitchell <mark@codesourcery.com>
* config/os/irix/bits/atomicity.h (_Atomic_word): Make it a
signed type.
(__exchange_aand_add): Adjust accordingly.
(__atomic_add): Likewise.
2000-11-02 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* src/locale.cc: Match orderings for static members.

View File

@ -22,21 +22,19 @@
#include <mutex.h>
typedef unsigned long _Atomic_word;
typedef long _Atomic_word;
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (_Atomic_word* __mem, int __val)
{
return test_then_add (__mem, __val);
return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
}
static inline void
__attribute__ ((unused))
__atomic_add (_Atomic_word* __mem, int __val)
{
test_then_add (__mem, __val);
__exchange_and_add (__mem, __val);
}
#endif /* atomicity.h */