]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-rh-bug-769421.patch
- release 4
[packages/glibc.git] / glibc-rh-bug-769421.patch
CommitLineData
583469ac
AM
1diff --git b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2index 54590b7..53970d7 100644
3--- b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4+++ a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5@@ -134,7 +134,6 @@ __pthread_cond_wait:
6 cmpl $PI_BIT, %eax
7 jne 18f
8
9-90:
10 movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
11 movl %ebp, %edx
12 xorl %esi, %esi
13@@ -148,9 +147,6 @@ __pthread_cond_wait:
14 sete 16(%esp)
15 je 19f
16
17- cmpl $-EAGAIN, %eax
18- je 91f
19-
20 /* Normal and PI futexes dont mix. Use normal futex functions only
21 if the kernel does not support the PI futex functions. */
22 cmpl $-ENOSYS, %eax
23@@ -395,78 +391,6 @@ __pthread_cond_wait:
24 #endif
25 call __lll_unlock_wake
26 jmp 11b
27-
28-91:
29-.LcleanupSTART2:
30- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
31- call it again. */
32-
33- /* Get internal lock. */
34- movl $1, %edx
35- xorl %eax, %eax
36- LOCK
37-#if cond_lock == 0
38- cmpxchgl %edx, (%ebx)
39-#else
40- cmpxchgl %edx, cond_lock(%ebx)
41-#endif
42- jz 92f
43-
44-#if cond_lock == 0
45- movl %ebx, %edx
46-#else
47- leal cond_lock(%ebx), %edx
48-#endif
49-#if (LLL_SHARED-LLL_PRIVATE) > 255
50- xorl %ecx, %ecx
51-#endif
52- cmpl $-1, dep_mutex(%ebx)
53- setne %cl
54- subl $1, %ecx
55- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
56-#if LLL_PRIVATE != 0
57- addl $LLL_PRIVATE, %ecx
58-#endif
59- call __lll_lock_wait
60-
61-92:
62- /* Increment the cond_futex value again, so it can be used as a new
63- expected value. */
64- addl $1, cond_futex(%ebx)
65- movl cond_futex(%ebx), %ebp
66-
67- /* Unlock. */
68- LOCK
69-#if cond_lock == 0
70- subl $1, (%ebx)
71-#else
72- subl $1, cond_lock(%ebx)
73-#endif
74- je 93f
75-#if cond_lock == 0
76- movl %ebx, %eax
77-#else
78- leal cond_lock(%ebx), %eax
79-#endif
80-#if (LLL_SHARED-LLL_PRIVATE) > 255
81- xorl %ecx, %ecx
82-#endif
83- cmpl $-1, dep_mutex(%ebx)
84- setne %cl
85- subl $1, %ecx
86- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
87-#if LLL_PRIVATE != 0
88- addl $LLL_PRIVATE, %ecx
89-#endif
90- call __lll_unlock_wake
91-
92-93:
93- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
94- xorl %ecx, %ecx
95- movl dep_mutex(%ebx), %edi
96- jmp 90b
97-.LcleanupEND2:
98-
99 .size __pthread_cond_wait, .-__pthread_cond_wait
100 versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
101 GLIBC_2_3_2)
102@@ -639,10 +563,6 @@ __condvar_w_cleanup:
103 .long .LcleanupEND-.Lsub_cond_futex
104 .long __condvar_w_cleanup-.LSTARTCODE
105 .uleb128 0
106- .long .LcleanupSTART2-.LSTARTCODE
107- .long .LcleanupEND2-.LcleanupSTART2
108- .long __condvar_w_cleanup-.LSTARTCODE
109- .uleb128 0
110 .long .LcallUR-.LSTARTCODE
111 .long .LENDCODE-.LcallUR
112 .long 0
113diff --git b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
114index d837d15..7535baa 100644
115--- b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
116+++ a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
117@@ -23,7 +23,6 @@
118 #include <lowlevelcond.h>
119 #include <tcb-offsets.h>
120 #include <pthread-pi-defines.h>
121-#include <pthread-errnos.h>
122
123 #include <kernel-features.h>
124
125@@ -134,14 +133,11 @@ __pthread_cond_wait:
126 cmpl $PI_BIT, %eax
127 jne 61f
128
129-90:
130 movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
131 movl $SYS_futex, %eax
132 syscall
133
134 movl $1, %r8d
135- cmpq $-EAGAIN, %rax
136- je 91f
137 #ifdef __ASSUME_REQUEUE_PI
138 jmp 62f
139 #else
140@@ -328,70 +324,6 @@ __pthread_cond_wait:
141
142 13: movq %r10, %rax
143 jmp 14b
144-
145-91:
146-.LcleanupSTART2:
147- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
148- call it again. */
149- movq 8(%rsp), %rdi
150-
151- /* Get internal lock. */
152- movl $1, %esi
153- xorl %eax, %eax
154- LOCK
155-#if cond_lock == 0
156- cmpxchgl %esi, (%rdi)
157-#else
158- cmpxchgl %esi, cond_lock(%rdi)
159-#endif
160- jz 92f
161-
162-#if cond_lock != 0
163- addq $cond_lock, %rdi
164-#endif
165- cmpq $-1, dep_mutex-cond_lock(%rdi)
166- movl $LLL_PRIVATE, %eax
167- movl $LLL_SHARED, %esi
168- cmovne %eax, %esi
169- callq __lll_lock_wait
170-#if cond_lock != 0
171- subq $cond_lock, %rdi
172-#endif
173-92:
174- /* Increment the cond_futex value again, so it can be used as a new
175- expected value. */
176- incl cond_futex(%rdi)
177- movl cond_futex(%rdi), %edx
178-
179- /* Release internal lock. */
180- LOCK
181-#if cond_lock == 0
182- decl (%rdi)
183-#else
184- decl cond_lock(%rdi)
185-#endif
186- jz 93f
187-
188-#if cond_lock != 0
189- addq $cond_lock, %rdi
190-#endif
191- cmpq $-1, dep_mutex-cond_lock(%rdi)
192- movl $LLL_PRIVATE, %eax
193- movl $LLL_SHARED, %esi
194- cmovne %eax, %esi
195- /* The call preserves %rdx. */
196- callq __lll_unlock_wake
197-#if cond_lock != 0
198- subq $cond_lock, %rdi
199-#endif
200-93:
201- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
202- xorq %r10, %r10
203- movq dep_mutex(%rdi), %r8
204- leaq cond_futex(%rdi), %rdi
205- jmp 90b
206-.LcleanupEND2:
207-
208 .size __pthread_cond_wait, .-__pthread_cond_wait
209 versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
210 GLIBC_2_3_2)
211@@ -544,15 +476,11 @@ __condvar_cleanup1:
212 .uleb128 .LcleanupSTART-.LSTARTCODE
213 .uleb128 .LcleanupEND-.LcleanupSTART
214 .uleb128 __condvar_cleanup1-.LSTARTCODE
215- .uleb128 0
216- .uleb128 .LcleanupSTART2-.LSTARTCODE
217- .uleb128 .LcleanupEND2-.LcleanupSTART2
218- .uleb128 __condvar_cleanup1-.LSTARTCODE
219- .uleb128 0
220+ .uleb128 0
221 .uleb128 .LcallUR-.LSTARTCODE
222 .uleb128 .LENDCODE-.LcallUR
223 .uleb128 0
224- .uleb128 0
225+ .uleb128 0
226 .Lcstend:
227
228
This page took 0.049673 seconds and 4 git commands to generate.