Commit 2e18525d authored by Bruce Momjian's avatar Bruce Momjian

s_lock patch from Ryan.

parent 47ea32f7
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -86,18 +86,18 @@ tas(volatile slock_t *lock)
register slock_t _res; register slock_t _res;
__asm__(" ldq $0, %0 \n\ __asm__(" ldq $0, %0 \n\
bne $0, already_set \n\ bne $0, 3f \n\
ldq_l $0, %0 \n\ ldq_l $0, %0 \n\
bne $0, already_set \n\ bne $0, 3f \n\
or $31, 1, $0 \n\ or $31, 1, $0 \n\
stq_c $0, %0 \n\ stq_c $0, %0 \n\
beq $0, stqc_fail \n\ beq $0, 2f \n\
success: bis $31, $31, %1 \n\ bis $31, $31, %1 \n\
mb \n\ mb \n\
jmp $31, end \n\ jmp $31, 4f \n\
stqc_fail: or $31, 1, $0 \n\ 2: or $31, 1, $0 \n\
already_set: bis $0, $0, %1 \n\ 3: bis $0, $0, %1 \n\
end: nop ": "=m"(*lock), "=r"(_res): :"0"); 4: nop ": "=m"(*lock), "=r"(_res): :"0");
return (int) _res; return (int) _res;
} }
......
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