Commit 7d3b1e8d by Mark Mitchell Committed by Mark Mitchell

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
parent 04e3be98
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> 2000-11-02 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* src/locale.cc: Match orderings for static members. * src/locale.cc: Match orderings for static members.
......
...@@ -22,21 +22,19 @@ ...@@ -22,21 +22,19 @@
#include <mutex.h> #include <mutex.h>
typedef unsigned long _Atomic_word; typedef long _Atomic_word;
static inline _Atomic_word static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (_Atomic_word* __mem, int __val) __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 static inline void
__attribute__ ((unused))
__atomic_add (_Atomic_word* __mem, int __val) __atomic_add (_Atomic_word* __mem, int __val)
{ {
test_then_add (__mem, __val); __exchange_and_add (__mem, __val);
} }
#endif /* atomicity.h */ #endif /* atomicity.h */
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