summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2012-01-02 03:44:01 +0000
committerTom Lane2012-01-02 05:02:01 +0000
commit8496c6cd77e2f5f105fc47315680174157d66647 (patch)
treea52fa38595783b1f3f2b0102b5f5b1c3ff54382a
parent5cfa8dd3007d7e953c6a03b0fa2215d97c581b0c (diff)
Use 4-byte slock_t on both PPC and PPC64.
Previously we defined slock_t as 8 bytes on PPC64, but the TAS assembly code uses word-wide operations regardless, so that the second word was just wasted space. There doesn't appear to be any performance benefit in adding the second word, so get rid of it to simplify the code.
-rw-r--r--src/include/storage/s_lock.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index cc67be81eb3..2e5163eabf0 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -354,13 +354,10 @@ tas(volatile slock_t *lock)
#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
#define HAS_TEST_AND_SET
-#if defined(__ppc64__) || defined(__powerpc64__)
-typedef unsigned long slock_t;
-#else
typedef unsigned int slock_t;
-#endif
#define TAS(lock) tas(lock)
+
/*
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.