about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-05-25 19:27:03 +0000
committerJakub Jelinek <jakub@redhat.com>2007-05-25 19:27:03 +0000
commit20a4d7228e33a9cc3e26a7ee935ede53306d8bd3 (patch)
treea936ef575fcf5f4057bc21f9f5c0bed37e8420da /nptl
parent47ad95ab96a69424d2291714ebe99f1eb87057da (diff)
downloadglibc-20a4d7228e33a9cc3e26a7ee935ede53306d8bd3.tar.gz
glibc-20a4d7228e33a9cc3e26a7ee935ede53306d8bd3.tar.xz
glibc-20a4d7228e33a9cc3e26a7ee935ede53306d8bd3.zip
* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
Move __pthread_enable_asynccancel right before futex syscall. 
* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): 
Likewise.
2007-05-25  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Move __pthread_enable_asynccancel right before futex syscall.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
	Likewise.

2007-05-24  Jakub Jelinek  <jakub@redhat.com>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S8
3 files changed, 19 insertions, 10 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 4ebc708733..923364cae5 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,4 +1,12 @@
-2007-04-24  Jakub Jelinek  <jakub@redhat.com>
+2007-05-25  Ulrich Drepper  <drepper@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+	Move __pthread_enable_asynccancel right before futex syscall.
+	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
+	Likewise.
+
+2007-05-24  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
 	THREAD_COPY_PRIVATE_FUTEX): Define.
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index aa1f9f41ca..bf70e17fca 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -79,10 +79,7 @@ sem_timedwait:
 	jae	6f
 
 	cfi_offset(3, -16)		/* %ebx */
-7:	call	__pthread_enable_asynccancel
-	movl	%eax, 8(%esp)
-
-	xorl	%ecx, %ecx
+7:	xorl	%ecx, %ecx
 	movl	%esp, %ebx
 	movl	%ecx, %edx
 	movl	$SYS_gettimeofday, %eax
@@ -105,6 +102,10 @@ sem_timedwait:
 
 	movl	%ecx, (%esp)	/* Store relative timeout.  */
 	movl	%edx, 4(%esp)
+
+	call	__pthread_enable_asynccancel
+	movl	%eax, 8(%esp)
+
 	movl	28(%esp), %ebx
 	xorl	%ecx, %ecx
 	movl	%esp, %esi
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index 76a566b988..8c5c2a6974 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -73,10 +73,7 @@ sem_timedwait:
 	cfi_offset(14, -24)		/* %r14 */
 	jae	6f
 
-7:	call	__pthread_enable_asynccancel
-	movl	%eax, 16(%rsp)
-
-	xorl	%esi, %esi
+7:	xorl	%esi, %esi
 	movq	%rsp, %rdi
 	movq	$VSYSCALL_ADDR_vgettimeofday, %rax
 	callq	*%rax
@@ -99,6 +96,9 @@ sem_timedwait:
 	movq	%rdi, (%rsp)	/* Store relative timeout.  */
 	movq	%rsi, 8(%rsp)
 
+	call	__pthread_enable_asynccancel
+	movl	%eax, 16(%rsp)
+
 	movq	%rsp, %r10
 	movq	%r12, %rdi
 	xorl	%esi, %esi