about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-12 08:41:10 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-12 08:41:10 +0000
commita3cd7da30f9ac88b43c913ef0c5b5a014e0dd2e7 (patch)
tree757b0ca4abb2dcee960a61fe2a7d615b222c3ef9 /nptl/sysdeps/unix/sysv/linux
parentd63609a7b6932f78d00db43f2f5c4d2b3eeb6a8e (diff)
downloadglibc-a3cd7da30f9ac88b43c913ef0c5b5a014e0dd2e7.tar.gz
glibc-a3cd7da30f9ac88b43c913ef0c5b5a014e0dd2e7.tar.xz
glibc-a3cd7da30f9ac88b43c913ef0c5b5a014e0dd2e7.zip
Return result of lock re-get if it fails.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index f11a44ec43..811741b06d 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -206,14 +206,15 @@ __pthread_cond_timedwait:
 	call	__pthread_mutex_lock_internal
 	addl	$36, %esp
 
-	movl	%esi, %eax
+	/* We return the result of the mutex_lock operation if it failed.  */
+	testl	%eax, %eax
+	cmovel	%esi, %eax
 
 18:	popl	%ebx
 	popl	%esi
 	popl	%edi
 	popl	%ebp
 
-	/* We return the result of the mutex_lock operation.  */
 	ret
 
 	/* Initial locking failed.  */