From 2e18525dbefc882c6749d91abb2c0d22d520b652 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Sat, 31 Oct 1998 02:06:08 +0000
Subject: [PATCH] s_lock patch from Ryan.

---
 src/include/storage/s_lock.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index aeb09cc4542..d47f5ab53b9 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.55 1998/10/28 15:58:34 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.56 1998/10/31 02:06:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -86,18 +86,18 @@ tas(volatile slock_t *lock)
 	register slock_t _res;
 
 __asm__("    ldq   $0, %0              \n\
-                 bne   $0, already_set     \n\
+                 bne   $0, 3f          \n\
                  ldq_l $0, %0	           \n\
-                 bne   $0, already_set     \n\
+                 bne   $0, 3f          \n\
                  or    $31, 1, $0          \n\
                  stq_c $0, %0	           \n\
-                 beq   $0, stqc_fail       \n\
-        success: bis   $31, $31, %1        \n\
+                 beq   $0, 2f              \n\
+                 bis   $31, $31, %1        \n\
                  mb		                   \n\
-                 jmp   $31, end	           \n\
-      stqc_fail: or    $31, 1, $0	       \n\
-    already_set: bis   $0, $0, %1	       \n\
-            end: nop      ": "=m"(*lock), "=r"(_res): :"0");
+                 jmp   $31, 4f	           \n\
+              2: or    $31, 1, $0	       \n\
+              3: bis   $0, $0, %1	       \n\
+              4: nop      ": "=m"(*lock), "=r"(_res): :"0");
 
 	return (int) _res;
 }
-- 
GitLab