diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port/osf.h | 4 | ||||
| -rw-r--r-- | src/include/storage/barrier.h | 9 | ||||
| -rw-r--r-- | src/include/storage/s_lock.h | 66 |
3 files changed, 0 insertions, 79 deletions
diff --git a/src/include/port/osf.h b/src/include/port/osf.h deleted file mode 100644 index d56b35b399f..00000000000 --- a/src/include/port/osf.h +++ /dev/null @@ -1,4 +0,0 @@ -/* src/include/port/osf.h */ - -#define NOFIXADE -#define DISABLE_XOPEN_NLS diff --git a/src/include/storage/barrier.h b/src/include/storage/barrier.h index bc61de0ff14..79a2f8d9b2c 100644 --- a/src/include/storage/barrier.h +++ b/src/include/storage/barrier.h @@ -109,16 +109,7 @@ extern slock_t dummy_spinlock; #define pg_memory_barrier() __asm__ __volatile__ ("sync" : : : "memory") #define pg_read_barrier() __asm__ __volatile__ ("lwsync" : : : "memory") #define pg_write_barrier() __asm__ __volatile__ ("lwsync" : : : "memory") -#elif defined(__alpha) || defined(__alpha__) /* Alpha */ -/* - * Unlike all other known architectures, Alpha allows dependent reads to be - * reordered, but we don't currently find it necessary to provide a conditional - * read barrier to cover that case. We might need to add that later. - */ -#define pg_memory_barrier() __asm__ __volatile__ ("mb" : : : "memory") -#define pg_read_barrier() __asm__ __volatile__ ("rmb" : : : "memory") -#define pg_write_barrier() __asm__ __volatile__ ("wmb" : : : "memory") #elif defined(__hppa) || defined(__hppa__) /* HP PA-RISC */ /* HPPA doesn't do either read or write reordering */ diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index ba4dfe12d86..895abe672b8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -548,51 +548,6 @@ tas(volatile slock_t *lock) #endif /* __vax__ */ -#if defined(__alpha) || defined(__alpha__) /* Alpha */ -/* - * Correct multi-processor locking methods are explained in section 5.5.3 - * of the Alpha AXP Architecture Handbook, which at this writing can be - * found at ftp://ftp.netbsd.org/pub/NetBSD/misc/dec-docs/index.html. - * For gcc we implement the handbook's code directly with inline assembler. - */ -#define HAS_TEST_AND_SET - -typedef unsigned long slock_t; - -#define TAS(lock) tas(lock) - -static __inline__ int -tas(volatile slock_t *lock) -{ - register slock_t _res; - - __asm__ __volatile__( - " ldq $0, %1 \n" - " bne $0, 2f \n" - " ldq_l %0, %1 \n" - " bne %0, 2f \n" - " mov 1, $0 \n" - " stq_c $0, %1 \n" - " beq $0, 2f \n" - " mb \n" - " br 3f \n" - "2: mov 1, %0 \n" - "3: \n" -: "=&r"(_res), "+m"(*lock) -: -: "memory", "0"); - return (int) _res; -} - -#define S_UNLOCK(lock) \ -do \ -{\ - __asm__ __volatile__ (" mb \n"); \ - *((volatile slock_t *) (lock)) = 0; \ -} while (0) - -#endif /* __alpha || __alpha__ */ - #if defined(__mips__) && !defined(__sgi) /* non-SGI MIPS */ /* Note: on SGI we use the OS' mutex ABI, see below */ @@ -733,27 +688,6 @@ tas(volatile slock_t *s_lock) #endif /* defined(USE_UNIVEL_CC) */ -#if defined(__alpha) || defined(__alpha__) /* Tru64 Unix Alpha compiler */ -/* - * The Tru64 compiler doesn't support gcc-style inline asm, but it does - * have some builtin functions that accomplish much the same results. - * For simplicity, slock_t is defined as long (ie, quadword) on Alpha - * regardless of the compiler in use. LOCK_LONG and UNLOCK_LONG only - * operate on an int (ie, longword), but that's OK as long as we define - * S_INIT_LOCK to zero out the whole quadword. - */ -#define HAS_TEST_AND_SET - -typedef unsigned long slock_t; - -#include <alpha/builtins.h> -#define S_INIT_LOCK(lock) (*(lock) = 0) -#define TAS(lock) (__LOCK_LONG_RETRY((lock), 1) == 0) -#define S_UNLOCK(lock) __UNLOCK_LONG(lock) - -#endif /* __alpha || __alpha__ */ - - #if defined(__hppa) || defined(__hppa__) /* HP PA-RISC, GCC and HP compilers */ /* * HP's PA-RISC |
