1 diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000
3 +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000
4 @@ -137,7 +137,6 @@ __pthread_cond_wait:
9 movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
12 @@ -151,9 +150,6 @@ __pthread_cond_wait:
19 /* Normal and PI futexes dont mix. Use normal futex functions only
20 if the kernel does not support the PI futex functions. */
22 @@ -398,78 +394,6 @@ __pthread_cond_wait:
24 call __lll_unlock_wake
29 - /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
32 - /* Get internal lock. */
37 - cmpxchgl %edx, (%ebx)
39 - cmpxchgl %edx, cond_lock(%ebx)
46 - leal cond_lock(%ebx), %edx
48 -#if (LLL_SHARED-LLL_PRIVATE) > 255
51 - cmpl $-1, dep_mutex(%ebx)
54 - andl $(LLL_SHARED-LLL_PRIVATE), %ecx
56 - addl $LLL_PRIVATE, %ecx
58 - call __lll_lock_wait
61 - /* Increment the cond_futex value again, so it can be used as a new
63 - addl $1, cond_futex(%ebx)
64 - movl cond_futex(%ebx), %ebp
71 - subl $1, cond_lock(%ebx)
77 - leal cond_lock(%ebx), %eax
79 -#if (LLL_SHARED-LLL_PRIVATE) > 255
82 - cmpl $-1, dep_mutex(%ebx)
85 - andl $(LLL_SHARED-LLL_PRIVATE), %ecx
87 - addl $LLL_PRIVATE, %ecx
89 - call __lll_unlock_wake
92 - /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
94 - movl dep_mutex(%ebx), %edi
98 .size __pthread_cond_wait, .-__pthread_cond_wait
99 versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
101 @@ -642,10 +566,6 @@ __condvar_w_cleanup:
102 .long .LcleanupEND-.Lsub_cond_futex
103 .long __condvar_w_cleanup-.LSTARTCODE
105 - .long .LcleanupSTART2-.LSTARTCODE
106 - .long .LcleanupEND2-.LcleanupSTART2
107 - .long __condvar_w_cleanup-.LSTARTCODE
109 .long .LcallUR-.LSTARTCODE
110 .long .LENDCODE-.LcallUR
112 Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
113 diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
114 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000
115 +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000
117 #include <lowlevelcond.h>
118 #include <tcb-offsets.h>
119 #include <pthread-pi-defines.h>
120 -#include <pthread-errnos.h>
121 #include <stap-probe.h>
123 #include <kernel-features.h>
124 @@ -137,14 +136,11 @@ __pthread_cond_wait:
129 movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
130 movl $SYS_futex, %eax
134 - cmpq $-EAGAIN, %rax
136 #ifdef __ASSUME_REQUEUE_PI
139 @@ -331,70 +327,6 @@ __pthread_cond_wait:
146 - /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
150 - /* Get internal lock. */
155 - cmpxchgl %esi, (%rdi)
157 - cmpxchgl %esi, cond_lock(%rdi)
162 - addq $cond_lock, %rdi
164 - cmpq $-1, dep_mutex-cond_lock(%rdi)
165 - movl $LLL_PRIVATE, %eax
166 - movl $LLL_SHARED, %esi
168 - callq __lll_lock_wait
170 - subq $cond_lock, %rdi
173 - /* Increment the cond_futex value again, so it can be used as a new
175 - incl cond_futex(%rdi)
176 - movl cond_futex(%rdi), %edx
178 - /* Release internal lock. */
183 - decl cond_lock(%rdi)
188 - addq $cond_lock, %rdi
190 - cmpq $-1, dep_mutex-cond_lock(%rdi)
191 - movl $LLL_PRIVATE, %eax
192 - movl $LLL_SHARED, %esi
194 - /* The call preserves %rdx. */
195 - callq __lll_unlock_wake
197 - subq $cond_lock, %rdi
200 - /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
202 - movq dep_mutex(%rdi), %r8
203 - leaq cond_futex(%rdi), %rdi
207 .size __pthread_cond_wait, .-__pthread_cond_wait
208 versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
210 @@ -547,15 +479,11 @@ __condvar_cleanup1:
211 .uleb128 .LcleanupSTART-.LSTARTCODE
212 .uleb128 .LcleanupEND-.LcleanupSTART
213 .uleb128 __condvar_cleanup1-.LSTARTCODE
215 - .uleb128 .LcleanupSTART2-.LSTARTCODE
216 - .uleb128 .LcleanupEND2-.LcleanupSTART2
217 - .uleb128 __condvar_cleanup1-.LSTARTCODE
220 .uleb128 .LcallUR-.LSTARTCODE
221 .uleb128 .LENDCODE-.LcallUR
228 Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig
229 Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej