summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-08-01 17:16:42 +0000
committerJakub Jelinek <jakub@redhat.com>2007-08-01 17:16:42 +0000
commite08057b1ff24258dd7460ad81e84491f7a28b424 (patch)
treef63a12d52cbc1796013a84382fe25f57ac675204 /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
parent4baf42dd00e8cafc79e2a3c94ef8effa6ef0a921 (diff)
Updated to fedora-glibc-20070801T1703cvs/fedora-glibc-2_6_90-2
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S56
1 files changed, 30 insertions, 26 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 93f4d56b32..79a7497e8c 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -19,20 +19,10 @@
#include <sysdep.h>
#include <shlib-compat.h>
+#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <pthread-errnos.h>
-#ifdef UP
-# define LOCK
-#else
-# define LOCK lock
-#endif
-
-#define SYS_gettimeofday __NR_gettimeofday
-#define SYS_futex 240
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-
.text
@@ -127,7 +117,7 @@ __pthread_cond_timedwait:
/* Get the current time. */
leal 4(%esp), %ebx
xorl %ecx, %ecx
- movl $SYS_gettimeofday, %eax
+ movl $__NR_gettimeofday, %eax
ENTER_KERNEL
movl %edx, %ebx
@@ -285,11 +275,13 @@ __pthread_cond_timedwait:
1:
.LSbl1:
#if cond_lock == 0
- movl %ebx, %ecx
+ movl %ebx, %edx
#else
- leal cond_lock(%ebx), %ecx
+ leal cond_lock(%ebx), %edx
#endif
- call __lll_mutex_lock_wait
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_lock_wait
jmp 2b
/* Unlock in loop requires wakeup. */
@@ -300,17 +292,21 @@ __pthread_cond_timedwait:
#else
leal cond_lock(%ebx), %eax
#endif
- call __lll_mutex_unlock_wake
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_unlock_wake
jmp 4b
/* Locking in loop failed. */
5:
#if cond_lock == 0
- movl %ebx, %ecx
+ movl %ebx, %edx
#else
- leal cond_lock(%ebx), %ecx
+ leal cond_lock(%ebx), %edx
#endif
- call __lll_mutex_lock_wait
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_lock_wait
jmp 6b
/* Unlock after loop requires wakeup. */
@@ -320,7 +316,9 @@ __pthread_cond_timedwait:
#else
leal cond_lock(%ebx), %eax
#endif
- call __lll_mutex_unlock_wake
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_unlock_wake
jmp 11b
/* The initial unlocking of the mutex failed. */
@@ -340,7 +338,9 @@ __pthread_cond_timedwait:
#else
leal cond_lock(%ebx), %eax
#endif
- call __lll_mutex_unlock_wake
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_unlock_wake
movl %esi, %eax
jmp 18b
@@ -350,7 +350,7 @@ __pthread_cond_timedwait:
.LSbl4:
19: leal 4(%esp), %ebx
xorl %ecx, %ecx
- movl $SYS_gettimeofday, %eax
+ movl $__NR_gettimeofday, %eax
ENTER_KERNEL
movl %edx, %ebx
@@ -396,11 +396,13 @@ __condvar_tw_cleanup:
jz 1f
#if cond_lock == 0
- movl %ebx, %ecx
+ movl %ebx, %edx
#else
- leal cond_lock(%ebx), %ecx
+ leal cond_lock(%ebx), %edx
#endif
- call __lll_mutex_lock_wait
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_lock_wait
1: movl broadcast_seq(%ebx), %eax
cmpl 20(%esp), %eax
@@ -457,7 +459,9 @@ __condvar_tw_cleanup:
#else
leal cond_lock(%ebx), %eax
#endif
- call __lll_mutex_unlock_wake
+ /* XYZ */
+ movl $LLL_SHARED, %ecx
+ call __lll_unlock_wake
/* Wake up all waiters to make sure no signal gets lost. */
2: testl %edi, %edi