summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-10-01 11:43:19 +0000
committerJakub Jelinek <jakub@redhat.com>2004-10-01 11:43:19 +0000
commitb7a09b9201b09b722209cb430813709505927be0 (patch)
treed42f6b7a1beba0394311fc49c20b7f81f678cab4 /nptl/sysdeps/unix/sysv/linux/i386/i486
parent6a87697239310dd529781d9db1ee705eeaa5405e (diff)
Updated to fedora-glibc-20041001T1134cvs/fedora-glibc-2_3_3-62
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index 96ea35caac..dc65b709a1 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
@@ -132,9 +132,8 @@ __lll_mutex_timedlock_wait:
ENTER_KERNEL
movl %eax, %ecx
-8:
+8: /* NB: %edx == 2 */
xorl %eax, %eax
- movl $2, %edx
LOCK
cmpxchgl %edx, (%ebx)
@@ -150,6 +149,12 @@ __lll_mutex_timedlock_wait:
/* Check whether the time expired. */
7: cmpl $-ETIMEDOUT, %ecx
je 5f
+
+ /* Make sure the current holder knows we are going to sleep. */
+ movl %edx, %eax
+ xchgl %eax, (%ebx)
+ testl %eax, %eax
+ jz 6b
jmp 1b
3: movl $EINVAL, %eax