summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S28
1 files changed, 17 insertions, 11 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index 5b24476936..bf70e17fca 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -49,12 +49,12 @@ sem_timedwait:
movl (%ecx), %eax
2: testl %eax, %eax
- je,pn 1f
+ je 1f
leal -1(%eax), %edx
LOCK
cmpxchgl %edx, (%ecx)
- jne,pn 2b
+ jne 2b
xorl %eax, %eax
ret
@@ -79,10 +79,7 @@ sem_timedwait:
jae 6f
cfi_offset(3, -16) /* %ebx */
-7: call __pthread_enable_asynccancel
- movl %eax, 8(%esp)
-
- xorl %ecx, %ecx
+7: xorl %ecx, %ecx
movl %esp, %ebx
movl %ecx, %edx
movl $SYS_gettimeofday, %eax
@@ -105,6 +102,10 @@ sem_timedwait:
movl %ecx, (%esp) /* Store relative timeout. */
movl %edx, 4(%esp)
+
+ call __pthread_enable_asynccancel
+ movl %eax, 8(%esp)
+
movl 28(%esp), %ebx
xorl %ecx, %ecx
movl %esp, %esi
@@ -117,7 +118,7 @@ sem_timedwait:
call __pthread_disable_asynccancel
testl %esi, %esi
- je,pt 9f
+ je 9f
cmpl $-EWOULDBLOCK, %esi
jne 3f
@@ -128,7 +129,7 @@ sem_timedwait:
leal -1(%eax), %ecx
LOCK
cmpxchgl %ecx, (%ebx)
- jne,pn 8b
+ jne 8b
addl $12, %esp
cfi_adjust_cfa_offset(-12)
@@ -158,9 +159,14 @@ sem_timedwait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
- movl %gs:0, %edx
- subl errno@gottpoff(%ebx), %edx
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl errno@gotntpoff(%ebx), %edx
+ addl %gs:0, %edx
movl %esi, (%edx)
+# else
+ movl errno@gotntpoff(%ebx), %edx
+ movl %esi, %gs:(%edx)
+# endif
#else
call __errno_location@plt
movl %esi, (%eax)