Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2e18525

Browse files
committed
s_lock patch from Ryan.
1 parent 47ea32f commit 2e18525

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/include/storage/s_lock.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.55 1998/10/28 15:58:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.56 1998/10/31 02:06:08 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -86,18 +86,18 @@ tas(volatile slock_t *lock)
8686
register slock_t _res;
8787

8888
__asm__(" ldq $0, %0 \n\
89-
bne $0, already_set \n\
89+
bne $0, 3f \n\
9090
ldq_l $0, %0 \n\
91-
bne $0, already_set \n\
91+
bne $0, 3f \n\
9292
or $31, 1, $0 \n\
9393
stq_c $0, %0 \n\
94-
beq $0, stqc_fail \n\
95-
success: bis $31, $31, %1 \n\
94+
beq $0, 2f \n\
95+
bis $31, $31, %1 \n\
9696
mb \n\
97-
jmp $31, end \n\
98-
stqc_fail: or $31, 1, $0 \n\
99-
already_set: bis $0, $0, %1 \n\
100-
end: nop ": "=m"(*lock), "=r"(_res): :"0");
97+
jmp $31, 4f \n\
98+
2: or $31, 1, $0 \n\
99+
3: bis $0, $0, %1 \n\
100+
4: nop ": "=m"(*lock), "=r"(_res): :"0");
101101

102102
return (int) _res;
103103
}

0 commit comments

Comments
 (0)