diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-05-29 05:38:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-05-29 05:38:43 +0000 |
commit | ea2630c63292c4c376c392dcbc6625a6aefa0d1e (patch) | |
tree | 7b2cfc0e31180b1de468f82bc1fa98ff0fb9b392 /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S | |
parent | 5a77f1501d9031c0fd8bad1d5a04b0379a99c029 (diff) | |
download | glibc-ea2630c63292c4c376c392dcbc6625a6aefa0d1e.tar.gz glibc-ea2630c63292c4c376c392dcbc6625a6aefa0d1e.tar.xz glibc-ea2630c63292c4c376c392dcbc6625a6aefa0d1e.zip |
Update.
2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX. * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t): Add __mutex field. * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD): Define. (lll_futex_wait, lll_futex_wake): Define. * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file. * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using FUTEX_REQUEUE instead of FUTEX_WAIT. * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise. * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember mutex which was used in condvar structure. Call __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal. * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't include tcb-offsets.h. Read wakeup value in locked region. Use the value of gbr register as THREAD_ID. * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise. * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise. * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise. * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related macros.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S index 27aecad314..14da24ec86 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S @@ -18,7 +18,6 @@ #include <sysdep.h> #include <lowlevelrwlock.h> -#include <tcb-offsets.h> #include <pthread-errnos.h> #include "lowlevel-atomic.h" @@ -34,6 +33,7 @@ .align 5 __pthread_rwlock_rdlock: mov.l r12, @-r15 + mov.l r9, @-r15 mov.l r8, @-r15 sts.l pr, @-r15 mov r4, r8 @@ -64,6 +64,8 @@ __pthread_rwlock_rdlock: tst r0, r0 bt 4f + mov.l @(READERS_WAKEUP,r8), r9 + #if MUTEX == 0 DEC (@r8, r2) #else @@ -75,7 +77,7 @@ __pthread_rwlock_rdlock: mov r8, r4 add #READERS_WAKEUP, r4 mov #FUTEX_WAIT, r5 - mov.l @(READERS_WAKEUP,r8), r6 + mov r9, r6 mov #0, r7 mov #SYS_futex, r3 extu.b r3, r3 @@ -116,6 +118,7 @@ __pthread_rwlock_rdlock: 7: lds.l @r15+, pr mov.l @r15+, r8 + mov.l @r15+, r9 mov.l @r15+, r12 rts mov r3, r0 @@ -134,8 +137,6 @@ __pthread_rwlock_rdlock: nop 14: stc gbr, r1 - mov.w .Ltcboff,r2 - sub r2,r1 cmp/eq r1, r0 bf 3b /* Deadlock detected. */ @@ -195,8 +196,6 @@ __pthread_rwlock_rdlock: bra 13b nop -.Ltcboff: - .word TLS_PRE_TCB_SIZE .align 2 .Lwait0: .long __lll_mutex_lock_wait-.Lwait0b |