diff options
author | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2004-02-27 20:56:46 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2004-02-27 20:56:46 +0000 |
commit | 00d04db68213730dd9a17ad3a748c470382e5cf6 (patch) | |
tree | cebcd004858b979fcd297bf6b2c14d865aa20a2c /libstdc++-v3/config/cpu | |
parent | c284a1261d4c603c648231f9e98b700a3602682e (diff) | |
download | gcc-00d04db68213730dd9a17ad3a748c470382e5cf6.zip gcc-00d04db68213730dd9a17ad3a748c470382e5cf6.tar.gz gcc-00d04db68213730dd9a17ad3a748c470382e5cf6.tar.bz2 |
atomicity.h: Include c++config.h to get defines.
2004-02-27 Benjamin Kosnik <bkoz@redhat.com>
* config/cpu/hppa/atomicity.h: Include c++config.h to get defines.
* src/misc-inst.cc (_S_atomicity_lock): Move to __gnu_cxx.
* config/os/irix/irix5.2/atomicity.h: Merge..
* config/os/irix/irix6.5/atomicity.h: Merge..
* config/os/irix/atomicity.h: ...into this.
* config/os/irix/atomic_word.h: New.
* configure.host: Set atomic_word_dir for irix.
* hppa/atomicity.h: Change __Atomicity_lock to _Atomicity_lock.
* i386/atomicity.h: Same.
* m68k/atomicity.h: Same.
* sparc/atomicity.h: Same.
From-SVN: r78577
Diffstat (limited to 'libstdc++-v3/config/cpu')
-rw-r--r-- | libstdc++-v3/config/cpu/hppa/atomicity.h | 22 | ||||
-rw-r--r-- | libstdc++-v3/config/cpu/i386/atomicity.h | 12 | ||||
-rw-r--r-- | libstdc++-v3/config/cpu/m68k/atomicity.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/config/cpu/sparc/atomicity.h | 14 |
4 files changed, 31 insertions, 31 deletions
diff --git a/libstdc++-v3/config/cpu/hppa/atomicity.h b/libstdc++-v3/config/cpu/hppa/atomicity.h index 4e0c252..2b1ce90 100644 --- a/libstdc++-v3/config/cpu/hppa/atomicity.h +++ b/libstdc++-v3/config/cpu/hppa/atomicity.h @@ -27,26 +27,26 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. +#include <bits/c++config.h> #include <bits/atomicity.h> namespace __gnu_cxx { - template<int __inst> - struct __Atomicity_lock + template<int _Inst> + struct _Atomicity_lock { static volatile int _S_atomicity_lock; }; - template<int __inst> + template<int _Inst> volatile int - __Atomicity_lock<__inst>::_S_atomicity_lock __attribute__ ((aligned (16))) = 1; + _Atomicity_lock<_Inst>::_S_atomicity_lock __attribute__ ((aligned (16))) = 1; - /* Because of the lack of weak support when using the hpux - som linker, we explicitly instantiate the atomicity lock - in src/misc-inst.cc when _GLIBCXX_INST_ATOMICITY_LOCK - is defined. */ + // Because of the lack of weak support when using the hpux som + // linker, we explicitly instantiate the atomicity lock in + // src/misc-inst.cc when _GLIBCXX_INST_ATOMICITY_LOCK is defined. #ifndef _GLIBCXX_INST_ATOMICITY_LOCK - template volatile int __Atomicity_lock<0>::_S_atomicity_lock; + template volatile int _Atomicity_lock<0>::_S_atomicity_lock; #endif int @@ -55,7 +55,7 @@ namespace __gnu_cxx { _Atomic_word result; int tmp; - volatile int& lock = __Atomicity_lock<0>::_S_atomicity_lock; + volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; __asm__ __volatile__ ("ldcw 0(%1),%0\n\t" "cmpib,<>,n 0,%0,.+20\n\t" @@ -79,7 +79,7 @@ namespace __gnu_cxx __atomic_add(_Atomic_word* __mem, int __val) { int tmp; - volatile int& lock = __Atomicity_lock<0>::_S_atomicity_lock; + volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; __asm__ __volatile__ ("ldcw 0(%1),%0\n\t" "cmpib,<>,n 0,%0,.+20\n\t" diff --git a/libstdc++-v3/config/cpu/i386/atomicity.h b/libstdc++-v3/config/cpu/i386/atomicity.h index 968bd24..92c03d5 100644 --- a/libstdc++-v3/config/cpu/i386/atomicity.h +++ b/libstdc++-v3/config/cpu/i386/atomicity.h @@ -32,15 +32,15 @@ namespace __gnu_cxx { template<int __inst> - struct __Atomicity_lock + struct _Atomicity_lock { static volatile _Atomic_word _S_atomicity_lock; }; template<int __inst> - volatile _Atomic_word __Atomicity_lock<__inst>::_S_atomicity_lock = 0; + volatile _Atomic_word _Atomicity_lock<__inst>::_S_atomicity_lock = 0; - template volatile _Atomic_word __Atomicity_lock<0>::_S_atomicity_lock; + template volatile _Atomic_word _Atomicity_lock<0>::_S_atomicity_lock; _Atomic_word __attribute__ ((__unused__)) @@ -52,9 +52,9 @@ namespace __gnu_cxx do { __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}" - : "=m" (__Atomicity_lock<0>::_S_atomicity_lock), + : "=m" (_Atomicity_lock<0>::_S_atomicity_lock), "+r" (__tmp) - : "m" (__Atomicity_lock<0>::_S_atomicity_lock)); + : "m" (_Atomicity_lock<0>::_S_atomicity_lock)); } while (__tmp); @@ -62,7 +62,7 @@ namespace __gnu_cxx *__mem += __val; // Release spin lock. - __Atomicity_lock<0>::_S_atomicity_lock = 0; + _Atomicity_lock<0>::_S_atomicity_lock = 0; return __result; } diff --git a/libstdc++-v3/config/cpu/m68k/atomicity.h b/libstdc++-v3/config/cpu/m68k/atomicity.h index b5827320..0e58f3c 100644 --- a/libstdc++-v3/config/cpu/m68k/atomicity.h +++ b/libstdc++-v3/config/cpu/m68k/atomicity.h @@ -72,15 +72,15 @@ namespace __gnu_cxx #else template<int __inst> - struct __Atomicity_lock + struct _Atomicity_lock { static volatile unsigned char _S_atomicity_lock; }; template<int __inst> - volatile unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0; + volatile unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0; - template volatile unsigned char __Atomicity_lock<0>::_S_atomicity_lock; + template volatile unsigned char _Atomicity_lock<0>::_S_atomicity_lock; _Atomic_word __attribute__ ((__unused__)) @@ -92,13 +92,13 @@ namespace __gnu_cxx #if defined(__mcf5200__) || defined(__mcf5300__) __asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b" : /* no outputs */ - : "a"(&__Atomicity_lock<0>::_S_atomicity_lock) + : "a"(&_Atomicity_lock<0>::_S_atomicity_lock) : "cc", "memory"); // CPU32 and MCF5400 support test-and-set (SMP-safe). #elif defined(__mcpu32__) || defined(__mcf5400__) __asm__ __volatile__("1: tas %0\n\tjbne 1b" - : "+m"(__Atomicity_lock<0>::_S_atomicity_lock) + : "+m"(_Atomicity_lock<0>::_S_atomicity_lock) : /* none */ : "cc"); @@ -107,7 +107,7 @@ namespace __gnu_cxx // memory controllers. #else __asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b" - : "+m"(__Atomicity_lock<0>::_S_atomicity_lock) + : "+m"(_Atomicity_lock<0>::_S_atomicity_lock) : /* none */ : "cc"); #endif @@ -115,7 +115,7 @@ namespace __gnu_cxx __result = *__mem; *__mem = __result + __val; - __Atomicity_lock<0>::_S_atomicity_lock = 0; + _Atomicity_lock<0>::_S_atomicity_lock = 0; return __result; } diff --git a/libstdc++-v3/config/cpu/sparc/atomicity.h b/libstdc++-v3/config/cpu/sparc/atomicity.h index 6d4b19b..a39153b 100644 --- a/libstdc++-v3/config/cpu/sparc/atomicity.h +++ b/libstdc++-v3/config/cpu/sparc/atomicity.h @@ -70,15 +70,15 @@ namespace __gnu_cxx #else /* __arch32__ */ template<int __inst> - struct __Atomicity_lock + struct _Atomicity_lock { static unsigned char _S_atomicity_lock; }; template<int __inst> - unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0; + unsigned char _Atomicity_lock<__inst>::_S_atomicity_lock = 0; - template unsigned char __Atomicity_lock<0>::_S_atomicity_lock; + template unsigned char _Atomicity_lock<0>::_S_atomicity_lock; _Atomic_word __attribute__ ((__unused__)) @@ -91,13 +91,13 @@ namespace __gnu_cxx " bne 1b\n\t" " nop" : "=&r" (__tmp) - : "r" (&__Atomicity_lock<0>::_S_atomicity_lock) + : "r" (&_Atomicity_lock<0>::_S_atomicity_lock) : "memory"); __result = *__mem; *__mem += __val; __asm__ __volatile__("stb %%g0, [%0]" : /* no outputs */ - : "r" (&__Atomicity_lock<0>::_S_atomicity_lock) + : "r" (&_Atomicity_lock<0>::_S_atomicity_lock) : "memory"); return __result; } @@ -113,12 +113,12 @@ namespace __gnu_cxx " bne 1b\n\t" " nop" : "=&r" (__tmp) - : "r" (&__Atomicity_lock<0>::_S_atomicity_lock) + : "r" (&_Atomicity_lock<0>::_S_atomicity_lock) : "memory"); *__mem += __val; __asm__ __volatile__("stb %%g0, [%0]" : /* no outputs */ - : "r" (&__Atomicity_lock<0>::_S_atomicity_lock) + : "r" (&_Atomicity_lock<0>::_S_atomicity_lock) : "memory"); } #endif /* __arch32__ */ |