On Thu, Jun 21, 2007 at 01:31:07PM +0800, David Woodhouse wrote:
> On Wed, 2007-06-20 at 18:42 +0200, Alexander Graf wrote:
> > implements futexes (this is mostly done by David Woodhouse as well,
> > FUTEX_WAKE_OP done by me)
> 
> #ifdef BSWAP_NEEDED, only FUTEX_OP_CMP_EQ and FUTEX_OP_CMP_NE will work
> as expected. If we want to do the rest then we'll need to implement
> FUTEX_OP_CMP_LT_WRONGENDIAN &c in the kernel.
> 
> Or maybe, since we don't do set_robust_list (and would need wrong-endian
> support in the kernel for that too), we can assume that it's all
> in-process, and hence all _within_ qemu, and we could actually implement
> the futex stuff entirely within qemu with qemu's own locking?
> 
> For now I think the safer option is just to leave FUTEX_WAKE_OP
> unimplemented. Jakub, what do you think?

FUTEX_WAKE_OP is just an optimization and the only op glibc uses is
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, so something that would need kernel help.
But all glibcs so far if syscall (SYS_futex, ... FUTEX_WAKE_OP, ...)
fails just fall back to syscall (SYS_futex, ... FUTEX_WAKE, ...) +
unlock.

So I think it is safe to leave FUTEX_WAKE_OP not supported for BSWAP_NEEDED.

        Jakub


Reply via email to