about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2010-01-15 18:09:14 -0800
committerUlrich Drepper <drepper@redhat.com>2010-01-15 18:09:14 -0800
commit893549c5a06956d2559391a3ffdeb6ded53b65c0 (patch)
tree9bdfb0297e3af6352618b78fbeeda14f4b6e63f0 /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
parentaa732e2b2b3178ed436b6df39180605437897f53 (diff)
downloadglibc-893549c5a06956d2559391a3ffdeb6ded53b65c0.tar.gz
glibc-893549c5a06956d2559391a3ffdeb6ded53b65c0.tar.xz
glibc-893549c5a06956d2559391a3ffdeb6ded53b65c0.zip
Fix pthread_cond_*wait with requeue-PI on i386.
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.S10
1 files changed, 5 insertions, 5 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 b3b8bc4be5..53970d755f 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
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2004, 2006-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004,2006-2007,2009,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -57,7 +57,6 @@ __pthread_cond_wait:
 	pushl	%ebx
 	cfi_adjust_cfa_offset(4)
 	cfi_rel_offset(%ebx, 0)
-	cfi_remember_state
 
 	xorl	%esi, %esi
 	movl	20(%esp), %ebx
@@ -95,6 +94,7 @@ __pthread_cond_wait:
 #define FRAME_SIZE 20
 	subl	$FRAME_SIZE, %esp
 	cfi_adjust_cfa_offset(FRAME_SIZE)
+	cfi_remember_state
 
 	/* Get and store current wakeup_seq value.  */
 	movl	wakeup_seq(%ebx), %edi
@@ -247,12 +247,11 @@ __pthread_cond_wait:
 	jne	10f
 
 	/* With requeue_pi, the mutex lock is held in the kernel.  */
-11:	xorl	%eax, %eax
+11:	movl	24+FRAME_SIZE(%esp), %eax
 	movl	16(%esp), %ecx
 	testl	%ecx, %ecx
-	jnz	20f
+	jnz	21f
 
-	movl	24+FRAME_SIZE(%esp), %eax
 	call	__pthread_mutex_cond_lock
 20:	addl	$FRAME_SIZE, %esp
 	cfi_adjust_cfa_offset(-FRAME_SIZE);
@@ -279,6 +278,7 @@ __pthread_cond_wait:
 	xorl	%eax, %eax
 	jmp	20b
 
+	cfi_adjust_cfa_offset(-FRAME_SIZE);
 	/* Initial locking failed.  */
 1:
 #if cond_lock == 0