From: Bruce Momjian Date: Sat, 31 Oct 1998 02:06:08 +0000 (+0000) Subject: s_lock patch from Ryan. X-Git-Tag: REL6_4_2~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e18525dbefc882c6749d91abb2c0d22d520b652;p=postgresql s_lock patch from Ryan. --- diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index aeb09cc454..d47f5ab53b 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; }