about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-27 04:24:31 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-27 04:24:31 +0000
commit7661d9f7838cedc4e35bf86b83cd4d27e41c8e4d (patch)
tree573208501c1e83b28b9492650e2a729724d6e1f2 /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
parent91ceedb37f9fda2460557cd61944e4d706caad3c (diff)
downloadglibc-7661d9f7838cedc4e35bf86b83cd4d27e41c8e4d.tar.gz
glibc-7661d9f7838cedc4e35bf86b83cd4d27e41c8e4d.tar.xz
glibc-7661d9f7838cedc4e35bf86b83cd4d27e41c8e4d.zip
Update.
2003-05-26  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
	typo in register name.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
	correctly.  Actually use requeue.  Little optimization.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
	mutex address early.  Handle cancellation state as 32-bit value.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
	Remove unnecessary label.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index 5189972fc7..2c6c6ce338 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -87,7 +87,7 @@ __condvar_cleanup:
 	movq	16(%r8), %rdi
 	callq	__pthread_mutex_cond_lock
 
-3:	retq
+	retq
 	.size	__condvar_cleanup, .-__condvar_cleanup
 
 
@@ -121,6 +121,8 @@ __pthread_cond_wait:
 	movq	%rdi, 8(%rsp)
 	movq	%rsi, 16(%rsp)
 
+	movq	%rsi, dep_mutex(%rdi)
+
 	/* Get internal lock.  */
 	movl	$1, %esi
 	LOCK
@@ -133,9 +135,7 @@ __pthread_cond_wait:
 	jne	1f
 
 	/* Unlock the mutex.  */
-2:	movq	%rdi, %rax
-	movq	16(%rsp), %rdi
-	movq	%rdi, dep_mutex(%rax)
+2:	movq	16(%rsp), %rdi
 	callq	__pthread_mutex_unlock_internal
 
 	testl	%eax, %eax
@@ -169,7 +169,7 @@ __pthread_cond_wait:
 	jne	3f
 
 4:	callq	__pthread_enable_asynccancel
-	movq	%rax, (%rsp)
+	movl	%eax, (%rsp)
 
 	movq	8(%rsp), %rdi
 	xorq	%r10, %r10
@@ -179,7 +179,7 @@ __pthread_cond_wait:
 	movq	%r10, %rsi	/* movq $FUTEX_WAIT, %rsi */
 	syscall
 
-	movq	(%rsp), %rdi
+	movl	(%rsp), %edi
 	callq	__pthread_disable_asynccancel
 
 	/* Lock.  */