diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
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.S | 34 |
1 files changed, 12 insertions, 22 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 969e80da2a..f5de0a280c 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 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -67,15 +67,9 @@ __condvar_cleanup: cmpl 4(%r8), %edx jne 3f - /* We increment the wakeup_seq counter only if it is lower than - total_seq. If this is not the case the thread was woken and - then canceled. In this case we ignore the signal. */ - movq total_seq(%rdi), %rax - cmpq wakeup_seq(%rdi), %rax - jbe 6f incq wakeup_seq(%rdi) + incq woken_seq(%rdi) incl cond_futex(%rdi) -6: incq woken_seq(%rdi) 3: subl $(1 << clock_bits), cond_nwaiters(%rdi) @@ -88,12 +82,12 @@ __condvar_cleanup: jne 4f addq $cond_nwaiters, %rdi - movl $SYS_futex, %eax - movl $FUTEX_WAKE, %esi + movq $SYS_futex, %rax + movq $FUTEX_WAKE, %rsi movl $1, %edx syscall subq $cond_nwaiters, %rdi - movl $1, %r12d + movq $1, %r12 4: LOCK #if cond_lock == 0 @@ -111,9 +105,9 @@ __condvar_cleanup: 2: testq %r12, %r12 jnz 5f addq $cond_futex, %rdi - movl $FUTEX_WAKE, %esi + movq $FUTEX_WAKE, %rsi movl $0x7fffffff, %edx - movl $SYS_futex, %eax + movq $SYS_futex, %rax syscall 5: movq 16(%r8), %rdi @@ -176,7 +170,7 @@ __pthread_cond_wait: /* Unlock the mutex. */ 2: movq 16(%rsp), %rdi - xorl %esi, %esi + xorq %rsi, %rsi callq __pthread_mutex_unlock_usercnt testl %eax, %eax @@ -221,12 +215,8 @@ __pthread_cond_wait: xorq %r10, %r10 movq %r12, %rdx addq $cond_futex-cond_lock, %rdi - movl $SYS_futex, %eax -#if FUTEX_WAIT == 0 - xorl %esi, %esi -#else - movl $FUTEX_WAIT, %esi -#endif + movq $SYS_futex, %rax + movq %r10, %rsi /* movq $FUTEX_WAIT, %rsi */ syscall movl (%rsp), %edi @@ -272,8 +262,8 @@ __pthread_cond_wait: jne 17f addq $cond_nwaiters, %rdi - movl $SYS_futex, %eax - movl $FUTEX_WAKE, %esi + movq $SYS_futex, %rax + movq $FUTEX_WAKE, %rsi movl $1, %edx syscall subq $cond_nwaiters, %rdi |