aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-09-12 16:07:53 +0000
committerBruce Momjian <bruce@momjian.us>1998-09-12 16:07:53 +0000
commit6ee06b0fd36ac6271f1b89c7814f0b918bf371c5 (patch)
tree4d665698fde5526e68de01f725c4ec0f42f9cb0a /src
parent786b1802c801eba347a42675ca0a09228b6588a1 (diff)
downloadpostgresql-6ee06b0fd36ac6271f1b89c7814f0b918bf371c5.tar.gz
postgresql-6ee06b0fd36ac6271f1b89c7814f0b918bf371c5.zip
Irix lock fix from Robert Bruccoleri
Diffstat (limited to 'src')
-rw-r--r--src/include/storage/s_lock.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 2a0c31cd9f2..e835762f208 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.46 1998/09/11 16:56:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.47 1998/09/12 16:07:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -266,10 +266,11 @@ static const slock_t clear_lock =
* assembly from his NECEWS SVR4 port, but we probably ought to retain this
* for the R3000 chips out there.
*/
-#define TAS(lock) (!acquire_lock(lock))
-#define S_UNLOCK(lock) release_lock(lock)
-#define S_INIT_LOCK(lock) init_lock(lock)
-#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
+#include <mutex.h>
+#define TAS(lock) (test_and_set(lock,1))
+#define S_UNLOCK(lock) (test_then_and(lock,0))
+#define S_INIT_LOCK(lock) (test_then_and(lock,0))
+#define S_LOCK_FREE(lock) (test_then_add(lock,0) == 0)
#endif /* __sgi */