summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-10-01 23:20:42 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-10-01 23:21:39 +0530
commit55a051c985c3e7965a2f5dd5f762ac2737adae01 (patch)
tree39837cae2143d738f84c38380a924b5ef65f14d5 /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
parentbec749fda1cbc1934f7e58dd2763603f4f207f26 (diff)
Fix exception table for i386 pthread_cond_wait
[BZ #14477] Add an additional entry in the exception table to jump to __condvar_w_cleanup2 instead of __condvar_w_cleanup for PI mutexes when %ebx contains the address of the futex instead of the condition variable.
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.S12
1 files changed, 11 insertions, 1 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 2ae7af2613..366de6938a 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
@@ -141,9 +141,11 @@ __pthread_cond_wait:
movl %ebp, %edx
xorl %esi, %esi
addl $cond_futex, %ebx
+.Ladd_cond_futex_pi:
movl $SYS_futex, %eax
ENTER_KERNEL
subl $cond_futex, %ebx
+.Lsub_cond_futex_pi:
/* Set the pi-requeued flag only if the kernel has returned 0. The
kernel does not hold the mutex on error. */
cmpl $0, %eax
@@ -630,7 +632,15 @@ __condvar_w_cleanup:
.uleb128 .Lcstend-.Lcstbegin
.Lcstbegin:
.long .LcleanupSTART-.LSTARTCODE
- .long .Ladd_cond_futex-.LcleanupSTART
+ .long .Ladd_cond_futex_pi-.LcleanupSTART
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+ .long .Ladd_cond_futex_pi-.LSTARTCODE
+ .long .Lsub_cond_futex_pi-.Ladd_cond_futex_pi
+ .long __condvar_w_cleanup2-.LSTARTCODE
+ .uleb128 0
+ .long .Lsub_cond_futex_pi-.LSTARTCODE
+ .long .Ladd_cond_futex-.Lsub_cond_futex_pi
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
.long .Ladd_cond_futex-.LSTARTCODE