]> granicus.if.org Git - postgresql/commitdiff
s_lock patch from Ryan.
authorBruce Momjian <bruce@momjian.us>
Sat, 31 Oct 1998 02:06:08 +0000 (02:06 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 31 Oct 1998 02:06:08 +0000 (02:06 +0000)
src/include/storage/s_lock.h

index aeb09cc4542dfafecf41ad95169bacdc4a4ccd49..d47f5ab53b9c4ebe30d0f5c89885ed3e8732faf6 100644 (file)
@@ -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;
 }