-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
1:
leal -1(%eax), %edx /* account for the preceeded xadd. */
movl $SYS_futex, %eax
- int $0x80
+ ENTER_KERNEL
orl $-1, %eax /* Load -1. */
#ifndef UP
0:
#endif
xaddl %eax, (%ebx)
- jne 1b
+ jne,pn 1b
movl $-1, (%ebx)
.size __lll_lock_wait,.-__lll_lock_wait
- .globl lll_unlock_wake_cb
- .type lll_unlock_wake_cb,@function
- .hidden lll_unlock_wake_cb
- .align 16
-lll_unlock_wake_cb:
- pushl %esi
- pushl %ebx
- pushl %ecx
- pushl %edx
-
- movl 20(%esp), %ebx
-#ifndef UP
- cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
- je,pt 0f
- lock
-0:
-#endif
- incl (%ebx)
- jng 1f
-
- popl %edx
- popl %ecx
- popl %ebx
- popl %esi
- ret
- .size lll_unlock_wake_cb,.-lll_unlock_wake_cb
-
-
.globl __lll_unlock_wake
.type __lll_unlock_wake,@function
.hidden __lll_unlock_wake
xorl %esi, %esi
movl %edx, (%ebx) /* Stores '$1'. */
movl $SYS_futex, %eax
- int $0x80
+ ENTER_KERNEL
popl %edx
popl %ecx
2: movl %esp, %ebx
xorl %ecx, %ecx
movl $SYS_gettimeofday, %eax
- int $0x80
+ ENTER_KERNEL
/* Compute relative timeout. */
movl 4(%esp), %eax
xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
movl %ebp, %ebx
movl $SYS_futex, %eax
- int $0x80
+ ENTER_KERNEL
movl %eax, %edx