Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8496c6c

Browse files
committed
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.
1 parent 5cfa8dd commit 8496c6c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/include/storage/s_lock.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,10 @@ tas(volatile slock_t *lock)
354354
#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
355355
#define HAS_TEST_AND_SET
356356

357-
#if defined(__ppc64__) || defined(__powerpc64__)
358-
typedef unsigned long slock_t;
359-
#else
360357
typedef unsigned int slock_t;
361-
#endif
362358

363359
#define TAS(lock) tas(lock)
360+
364361
/*
365362
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
366363
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.

0 commit comments

Comments
 (0)