From: Paul M. <le...@li...> - 2007-06-18 01:30:36
|
On Mon, Jun 18, 2007 at 10:11:47AM +0900, Kaz Kojima wrote: > Paul Mundt <le...@li...> wrote: > > Hmm.. this all looks terribly generic, if glibc requires the generic > > implementation to be extended, perhaps this change should be made against > > asm-generic/futex.h instead? > > Perhaps if local_irq_* are removed, as I can't find any use of > them in asm-generic/*.h. It seems to me that the situation is > quite similar to atomic.h. So asm-sh/futex.h which includes > asm-sh/futex-irq.h and asm-sh/futex-llsc.h selectively might > be a way to go, though I have no strong opinion. > Yes, but I'm rather concerned about the size, perhaps we should and move it out-of-line and inline the op handlers? If we just have a set of atomic_futex_op_xxx() ops that correspond to each FUTEX_OP_xxx that are inlined in futex.h (FR-V seems to do this already, in arch/frv/kernel/futex.c), futex_atomic_op_inuser() can be brought out-of-line without any trouble, and we can bury all of the local_irq_xxx() mess in the futex op itself. Also, is futex_atomic_cmpxchg_inatomic() required, or should this simply be a -ENOSYS if we don't have ll/sc methods? It seems like kernel/futex.c handles the -ENOSYS case ok, and other platforms do return this way. |