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_cond_signal.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_cond_signal.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S index a00064153f..8248b3b415 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S @@ -19,12 +19,15 @@ #include <sysdep.h> #include <shlib-compat.h> #include <lowlevelcond.h> +#include <kernel-features.h> #include "lowlevel-atomic.h" #define SYS_futex 240 #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 +#define FUTEX_REQUEUE 3 +#define EINVAL 22 .text @@ -70,15 +73,28 @@ __pthread_cond_signal: mov.l r0,@(wakeup_seq,r8) mov.l r1,@(wakeup_seq+4,r8) - /* Wake up one thread. */ mov r8, r4 add #wakeup_seq, r4 +#ifdef __ASSUME_FUTEX_REQUEUE + /* Wake up one thread by moving it to the internal lock futex. */ + mov #FUTEX_REQUEUE, r5 + mov #0, r6 + mov #1, r7 + mov r8, r0 +# if cond_lock != 0 + add #cond_lock, r0 +# endif + mov #SYS_futex, r3 + extu.b r3, r3 + trapa #0x15 +#else mov #FUTEX_WAKE, r5 mov #1, r6 mov #0, r7 mov #SYS_futex, r3 extu.b r3, r3 trapa #0x14 +#endif SYSCALL_INST_PAD 4: |