* 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>
This commit is contained in:
Jakub Jelinek 2007-05-25 19:27:03 +00:00
parent 47ad95ab96
commit 20a4d7228e
3 changed files with 19 additions and 10 deletions

View File

@ -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, * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
THREAD_COPY_PRIVATE_FUTEX): Define. THREAD_COPY_PRIVATE_FUTEX): Define.

View File

@ -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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@ -79,10 +79,7 @@ sem_timedwait:
jae 6f jae 6f
cfi_offset(3, -16) /* %ebx */ cfi_offset(3, -16) /* %ebx */
7: call __pthread_enable_asynccancel 7: xorl %ecx, %ecx
movl %eax, 8(%esp)
xorl %ecx, %ecx
movl %esp, %ebx movl %esp, %ebx
movl %ecx, %edx movl %ecx, %edx
movl $SYS_gettimeofday, %eax movl $SYS_gettimeofday, %eax
@ -105,6 +102,10 @@ sem_timedwait:
movl %ecx, (%esp) /* Store relative timeout. */ movl %ecx, (%esp) /* Store relative timeout. */
movl %edx, 4(%esp) movl %edx, 4(%esp)
call __pthread_enable_asynccancel
movl %eax, 8(%esp)
movl 28(%esp), %ebx movl 28(%esp), %ebx
xorl %ecx, %ecx xorl %ecx, %ecx
movl %esp, %esi movl %esp, %esi

View File

@ -73,10 +73,7 @@ sem_timedwait:
cfi_offset(14, -24) /* %r14 */ cfi_offset(14, -24) /* %r14 */
jae 6f jae 6f
7: call __pthread_enable_asynccancel 7: xorl %esi, %esi
movl %eax, 16(%rsp)
xorl %esi, %esi
movq %rsp, %rdi movq %rsp, %rdi
movq $VSYSCALL_ADDR_vgettimeofday, %rax movq $VSYSCALL_ADDR_vgettimeofday, %rax
callq *%rax callq *%rax
@ -99,6 +96,9 @@ sem_timedwait:
movq %rdi, (%rsp) /* Store relative timeout. */ movq %rdi, (%rsp) /* Store relative timeout. */
movq %rsi, 8(%rsp) movq %rsi, 8(%rsp)
call __pthread_enable_asynccancel
movl %eax, 16(%rsp)
movq %rsp, %r10 movq %rsp, %r10
movq %r12, %rdi movq %r12, %rdi
xorl %esi, %esi xorl %esi, %esi