V3 PATCH: IRIX atomicity.h

Mark Mitchell mark@codesourcery.com
Thu Nov 2 12:38:00 GMT 2000


It turns out that V3 expects _Atomic_word to be a signed type.  Fixed
in the IRIX atomicity.h below.  This brings us to:

  pass/fail results:  142/40

on IRIX.  Some (most?) of the remainder are related to IRIX's lack of
support for wide-characters; I'll be putting in testsuite changes to
accomodate this shortly.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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.
	
Index: config/os/irix/bits/atomicity.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/irix/bits/atomicity.h,v
retrieving revision 1.2
diff -c -p -r1.2 atomicity.h
*** atomicity.h	2000/10/29 22:31:16	1.2
--- atomicity.h	2000/11/02 20:30:16
***************
*** 22,42 ****
  
  #include <mutex.h>
  
! typedef unsigned long _Atomic_word;
  
  static inline _Atomic_word
- __attribute__ ((__unused__))
  __exchange_and_add (_Atomic_word* __mem, int __val)
  {
!   return test_then_add (__mem, __val);
  }
  
  
  static inline void
- __attribute__ ((unused))
  __atomic_add (_Atomic_word* __mem, int __val)
  {
!   test_then_add (__mem, __val);
  }
  
  #endif /* atomicity.h */
--- 22,40 ----
  
  #include <mutex.h>
  
! typedef long _Atomic_word;
  
  static inline _Atomic_word
  __exchange_and_add (_Atomic_word* __mem, int __val)
  {
!   return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
  }
  
  
  static inline void
  __atomic_add (_Atomic_word* __mem, int __val)
  {
!   __exchange_and_add (__mem, __val);
  }
  
  #endif /* atomicity.h */


More information about the Libstdc++ mailing list