> In debugging the failure of the glibc tst-cond18 test on parisc, I > realized > that futexes need to use the same locks the lws calls. This fixes all the > pthread 'cond' tests. Sadly, there are still problems with thread > cancellation. > > Signed-of-by: John David Anglin <dave.anglin@xxxxxxxx> > > diff --git a/arch/parisc/include/asm/futex.h > b/arch/parisc/include/asm/futex.h > index 2388bdb..a8d0586 100644 > --- a/arch/parisc/include/asm/futex.h > +++ b/arch/parisc/include/asm/futex.h > @@ -8,6 +8,29 @@ > #include <asm/atomic.h> > #include <asm/errno.h> > > +/* The following has to match the LWS code in syscall.S. We have > + sixteen four-word locks. */ > + > +static inline void > +_futex_spin_lock_irqsave (u32 __user *uaddr, unsigned long int *flags) > +{ > + extern u32 lws_lock_start[]; > + long index = ((long)uaddr & 0xf0) >> 2; > + arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index]; > + local_irq_save(*flags); > + arch_spin_lock(s); > +} > + > +static inline void > +_futex_spin_unlock_irqrestore (u32 __user *uaddr, unsigned long int > *flags) > +{ > + extern u32 lws_lock_start[]; > + long index = ((long)uaddr & 0xf0) >> 2; > + arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index]; > + arch_spin_unlock(s); > + local_irq_restore(*flags); > +} > + > static inline int > futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) > { This needs tabs. Greetings, Eike -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html