Re: [patch] futex: restartable futex_wait

From: Ingo Molnar
Date: Sat Mar 10 2007 - 04:10:11 EST



* Nick Piggin <npiggin@xxxxxxx> wrote:

> LTP test sigaction_16_24 fails, because it expects sem_wait to be
> restarted if SA_RESTART is set. sem_wait is implemented with
> futex_wait, that currently doesn't support being restarted. Ulrich
> confirms that the call should be restartable.
>
> Implement a restart_block method to handle the relative timeout, and
> allow restarts.
>
> Signed-off-by: Nick Piggin <npiggin@xxxxxxx>

yeah:

Acked-by: Ingo Molnar <mingo@xxxxxxx>

i was totally confused and thought this was the original argument:

> + restart->arg2 = time;
> + return -ERESTART_RESTARTBLOCK;

but it's indeed the 'new' relative timeout. (It can still be a tiny bit
inaccurate because if there are many signals then the signals will delay
the relative timeout - so absolute timeouts are still better - but your
fix is correct and needed nevertheless)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/