about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-15 21:46:30 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-15 21:46:30 +0000
commit7abed17041f92492ceadecf04d5d31f395f84ae1 (patch)
treed70f84726f01a681161c0c35842b63627c22b6b3 /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
parent39d8c1a2f43ecac503ed39f6df16c93d9655c6dd (diff)
downloadglibc-7abed17041f92492ceadecf04d5d31f395f84ae1.tar.gz
glibc-7abed17041f92492ceadecf04d5d31f395f84ae1.tar.xz
glibc-7abed17041f92492ceadecf04d5d31f395f84ae1.zip
More random patches.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S21
1 files changed, 19 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 2198c3a140..3c8acc1c25 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -48,6 +48,23 @@ __pthread_cond_timedwait:
 	pushq	%r13
 	pushq	%r14
 	subq	$80, %rsp
+	/* Stack frame:
+
+	   rsp + 80
+	            +--------------------------+
+	   rsp + 48 | cleanup buffer           |
+	            +--------------------------+
+	   rsp + 40 | old wake_seq value       |
+	            +--------------------------+
+	   rsp + 24 | timeout value            |
+	            +--------------------------+
+	   rsp + 16 | mutex pointer            |
+	            +--------------------------+
+	   rsp +  8 | condvar pointer          |
+	            +--------------------------+
+	   rsp +  0 | old cancellation mode    |
+	            +--------------------------+
+	*/
 
 	/* Prepare structure passed to cancellation handler.  */
 	movq	%rdi, 8(%rsp)
@@ -73,7 +90,7 @@ __pthread_cond_timedwait:
 	jne	16f
 
 	movq	8(%rsp), %rdi
-	addq	$1, total_seq(%rdi)
+	incq	total_seq(%rdi)
 
 	/* Install cancellation handler.  */
 #ifdef PIC
@@ -113,7 +130,7 @@ __pthread_cond_timedwait:
 	movq	$1000, %rdx
 	mul	%rdx		/* Milli seconds to nano seconds.  */
 	movq	(%r13), %rcx
-	movq	4(%r13), %rdx
+	movq	8(%r13), %rdx
 	subq	24(%rsp), %rcx
 	subq	%rax, %rdx
 	jns	12f