From c7fb36b48ebdf75efd5e2b3651befd64bfa3ca27 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 28 Nov 2006 05:54:32 +0000 Subject: [PATCH] Back-patch HEAD's fixes to recognize __ppc64__ as equivalent to __powerpc64__. Per confirmation from Brian Wipf that this is correct and necessary for Darwin 64-bit. --- src/include/storage/s_lock.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index d8c6c83689..ea917c393c 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -323,10 +323,11 @@ tas(volatile slock_t *lock) #endif /* __sparc__ */ -#if defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__) +/* PowerPC */ +#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__) #define HAS_TEST_AND_SET -#if defined(__powerpc64__) +#if defined(__ppc64__) || defined(__powerpc64__) typedef unsigned long slock_t; #else typedef unsigned int slock_t; @@ -366,7 +367,7 @@ tas(volatile slock_t *lock) /* PowerPC S_UNLOCK is almost standard but requires a "sync" instruction */ #define S_UNLOCK(lock) \ do \ -{\ +{ \ __asm__ __volatile__ (" sync \n"); \ *((volatile slock_t *) (lock)) = 0; \ } while (0) -- 2.39.5