From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- .../sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S') diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S index 1fcb07eaef..0e82f890aa 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -72,8 +72,12 @@ __pthread_rwlock_wrlock: jne 10f 11: addq $WRITERS_WAKEUP, %rdi - movq %r10, %rsi /* movq $FUTEX_WAIT, %rsi */ - movq $SYS_futex, %rax +#if FUTEX_WAIT == 0 + xorl %esi, %esi +#else + movl $FUTEX_WAIT, %esi +#endif + movl $SYS_futex, %eax syscall subq $WRITERS_WAKEUP, %rdi @@ -92,7 +96,7 @@ __pthread_rwlock_wrlock: 13: decl WRITERS_QUEUED(%rdi) jmp 2b -5: xorq %rdx, %rdx +5: xorl %edx, %edx movl %fs:TID, %eax movl %eax, WRITER(%rdi) 9: LOCK @@ -119,7 +123,7 @@ __pthread_rwlock_wrlock: 14: cmpl %fs:TID, %eax jne 3b - movq $EDEADLK, %rdx + movl $EDEADLK, %edx jmp 9b 6: -- cgit 1.4.1