diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-24 09:23:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-24 09:23:15 +0000 |
commit | 18a535792b7a63721a123e152266c4b8cf1fae8e (patch) | |
tree | b86a475d52a5cade9e9820808a7d8f165cf081aa /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S | |
parent | 3724f268b15bdbd322cda97f88a965a68f2fd3ef (diff) | |
download | glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.tar.gz glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.tar.xz glibc-18a535792b7a63721a123e152266c4b8cf1fae8e.zip |
Update.
* sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise. * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S index b275b8b922..2e47350990 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S @@ -79,6 +79,8 @@ pthread_rwlock_timedrdlock: incl READERS_QUEUED(%ebp) je 4f + movl READERS_WAKEUP(%ebp), %esi + LOCK #if MUTEX == 0 decl (%ebp) @@ -110,9 +112,9 @@ pthread_rwlock_timedrdlock: /* Futex call. */ movl %ecx, (%esp) /* Store relative timeout. */ movl %edx, 4(%esp) + movl %esi, %edx xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */ movl %esp, %esi - movl %ecx, %edx leal READERS_WAKEUP(%ebp), %ebx movl $SYS_futex, %eax ENTER_KERNEL @@ -130,12 +132,12 @@ pthread_rwlock_timedrdlock: testl %eax, %eax jne 12f -13: cmpl $-ETIMEDOUT, %ecx - je 18f - decl READERS_QUEUED(%ebp) +13: decl READERS_QUEUED(%ebp) + cmpl $-ETIMEDOUT, %edx jne 2b - movl $0, READERS_WAKEUP(%ebp) - jmp 2b + +18: movl $ETIMEDOUT, %ecx + jmp 9f 5: xorl %ecx, %ecx @@ -158,7 +160,12 @@ pthread_rwlock_timedrdlock: popl %esi ret -1: movl %ebp, %ecx +1: +#if MUTEX == 0 + movl %ebp, %ecx +#else + leal MUTEX(%ebp), %ecx +#endif call __lll_mutex_lock_wait jmp 2b @@ -167,7 +174,12 @@ pthread_rwlock_timedrdlock: movl $EDEADLK, %ecx jmp 9b -6: movl %ebp, %eax +6: +#if MUTEX == 0 + movl %ebp, %eax +#else + leal MUTEX(%ebp), %eax +#endif call __lll_mutex_unlock_wake jmp 7b @@ -181,20 +193,27 @@ pthread_rwlock_timedrdlock: movl $EAGAIN, %ecx jmp 9b -10: movl %ebp, %eax +10: +#if MUTEX == 0 + movl %ebp, %eax +#else + leal MUTEX(%ebp), %eax +#endif call __lll_mutex_unlock_wake jmp 11b -12: movl %ebx, %ecx +12: +#if MUTEX == 0 + movl %ebp, %ecx +#else + leal MUTEX(%ebp), %ecx +#endif call __lll_mutex_lock_wait jmp 13b -16: movl $-ETIMEDOUT, %ecx +16: movl $-ETIMEDOUT, %edx jmp 17b -18: movl $ETIMEDOUT, %ecx - jmp 9b - 19: movl $EINVAL, %ecx jmp 9b .size pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock |