diff options
author | Bruce Momjian | 1999-07-13 20:12:51 +0000 |
---|---|---|
committer | Bruce Momjian | 1999-07-13 20:12:51 +0000 |
commit | 050371fccdaeac8fa426c8e95aedf4edb541e829 (patch) | |
tree | 5e7527c3abab4c07b53add64b9a48aaa442d719a /src/include | |
parent | 540c114225c868d06a856836f1f7734c58f6dfef (diff) |
More cpu cleanups, only for 6.6.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/port/bsd.h | 15 | ||||
-rw-r--r-- | src/include/port/bsdi.h | 2 | ||||
-rw-r--r-- | src/include/port/freebsd.h | 1 | ||||
-rw-r--r-- | src/include/port/linux.h | 12 | ||||
-rw-r--r-- | src/include/port/univel.h | 1 | ||||
-rw-r--r-- | src/include/storage/s_lock.h | 10 |
6 files changed, 23 insertions, 18 deletions
diff --git a/src/include/port/bsd.h b/src/include/port/bsd.h index 9b8b0b65428..c3a6adb9538 100644 --- a/src/include/port/bsd.h +++ b/src/include/port/bsd.h @@ -28,15 +28,16 @@ #define HAS_TEST_AND_SET #endif -#if defined(__powerpc__) -#define HAS_TEST_AND_SET -typedef unsigned int slock_t; - -#endif #if defined(__mips__) /* # undef HAS_TEST_AND_SET */ #endif -#if !defined(__powerpc__) -typedef unsigned char slock_t; +#if defined(__powerpc__) +#define HAS_TEST_AND_SET +#endif + +#if defined(__powerpc__) +typedef unsigned int slock_t; +#else +typedef unsigned char slock_t; #endif diff --git a/src/include/port/bsdi.h b/src/include/port/bsdi.h index cef69b8dc54..bb6cbb801ef 100644 --- a/src/include/port/bsdi.h +++ b/src/include/port/bsdi.h @@ -4,6 +4,8 @@ #if defined(__sparc__) #define NEED_SPARC_TAS_ASM #endif + #define USE_POSIX_TIME #define HAS_TEST_AND_SET + typedef unsigned char slock_t; diff --git a/src/include/port/freebsd.h b/src/include/port/freebsd.h index 5e3af51cbca..162ff5acfd9 100644 --- a/src/include/port/freebsd.h +++ b/src/include/port/freebsd.h @@ -27,4 +27,5 @@ #if defined(__mips__) /* # undef HAS_TEST_AND_SET */ #endif + typedef unsigned char slock_t; diff --git a/src/include/port/linux.h b/src/include/port/linux.h index da57b2b9a3d..eed59333e09 100644 --- a/src/include/port/linux.h +++ b/src/include/port/linux.h @@ -8,18 +8,18 @@ #define USE_POSIX_TIME #define HAS_TEST_AND_SET -#if defined(__powerpc__) +#if if defined(__i386__) +typedef unsigned char slock_t; + +#elif defined(__powerpc__) typedef unsigned int slock_t; -#elif defined(__alpha) +#elif defined(__alpha__) typedef long int slock_t; -#elif defined(__mips) +#elif defined(__mips__) typedef unsigned int slock_t; -#else /* i386 probably */ -typedef unsigned char slock_t; - #endif #if (__GLIBC__ >= 2) diff --git a/src/include/port/univel.h b/src/include/port/univel.h index e8c066f7c5e..91ff2c6b362 100644 --- a/src/include/port/univel.h +++ b/src/include/port/univel.h @@ -4,6 +4,7 @@ #define HAS_TEST_AND_SET #define NEED_I386_TAS_ASM + /*************************************** * Define this if you are compiling with * the native UNIXWARE C compiler. diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 85561a60dac..3125d822ec4 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.62 1999/07/13 20:00:36 momjian Exp $ + * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.63 1999/07/13 20:12:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -78,7 +78,7 @@ extern void s_lock_sleep(unsigned spin); * All the gcc inlines */ -#if defined(__alpha) +#if defined(__alpha__) #define TAS(lock) tas(lock) #define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; } @@ -104,7 +104,7 @@ __asm__(" ldq $0, %0 \n\ return (int) _res; } -#endif /* __alpha */ +#endif /* __alpha__ */ @@ -226,7 +226,7 @@ tas(volatile slock_t *lock) * All non gcc */ -#if defined(__alpha) +#if defined(__alpha__) /* * OSF/1 (Alpha AXP) * @@ -237,7 +237,7 @@ tas(volatile slock_t *lock) #define S_UNLOCK(lock) msem_unlock((lock), 0) #define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED) #define S_LOCK_FREE(lock) (!(lock)->msem_state) -#endif /* __alpha */ +#endif /* __alpha__ */ |