diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-08-01 17:16:42 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-08-01 17:16:42 +0000 |
commit | e08057b1ff24258dd7460ad81e84491f7a28b424 (patch) | |
tree | f63a12d52cbc1796013a84382fe25f57ac675204 /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | |
parent | 4baf42dd00e8cafc79e2a3c94ef8effa6ef0a921 (diff) |
Updated to fedora-glibc-20070801T1703cvs/fedora-glibc-2_6_90-2
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S index c92cfbc718..68741bffe8 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S @@ -19,19 +19,10 @@ #include <sysdep.h> #include <shlib-compat.h> +#include <lowlevellock.h> #include <lowlevelcond.h> #include <tcb-offsets.h> -#ifdef UP -# define LOCK -#else -# define LOCK lock -#endif - -#define SYS_futex 240 -#define FUTEX_WAIT 0 -#define FUTEX_WAKE 1 - .text @@ -202,11 +193,13 @@ __pthread_cond_wait: 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 waekup. */ @@ -217,17 +210,21 @@ __pthread_cond_wait: #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. */ @@ -237,7 +234,9 @@ __pthread_cond_wait: #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. */ @@ -257,7 +256,9 @@ __pthread_cond_wait: #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 14b @@ -287,11 +288,13 @@ __condvar_w_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 12(%esp), %eax @@ -348,7 +351,9 @@ __condvar_w_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 |