Commit 6249971b authored by Tom Lane's avatar Tom Lane

Just noticed that use of 'volatile' in HPPA S_UNLOCK() was causing gcc

to generate unnecessarily stupid code.  Tweak macro to describe a series
of store-constant ops, not store/load/store/load/store/load/store.
parent 810c0b85
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.88 2001/02/10 04:07:25 tgl Exp $ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.89 2001/02/16 23:50:40 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -392,8 +392,10 @@ tas(volatile slock_t *lock) ...@@ -392,8 +392,10 @@ tas(volatile slock_t *lock)
#define S_UNLOCK(lock) \ #define S_UNLOCK(lock) \
do { \ do { \
volatile slock_t *lock_ = (volatile slock_t *) (lock); \ volatile slock_t *lock_ = (volatile slock_t *) (lock); \
lock_->sema[0] = lock_->sema[1] = \ lock_->sema[0] = -1; \
lock_->sema[2] = lock_->sema[3] = -1; \ lock_->sema[1] = -1; \
lock_->sema[2] = -1; \
lock_->sema[3] = -1; \
} while (0) } while (0)
#define S_LOCK_FREE(lock) ( *(int *) (((long) (lock) + 15) & ~15) != 0) #define S_LOCK_FREE(lock) ( *(int *) (((long) (lock) + 15) & ~15) != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment