Re: [PATCH]: correction: add a new wait_event_interruptible_timeout_modify helper

From: Oleg Nesterov
Date: Fri Sep 26 2008 - 11:15:31 EST


On 09/26, Anirban Sinha wrote:
>
> arrghh!!! my bad. corrected patch is pasted below:

The patch has numerous whitespace damages, please fix your mailer.

But more importantly, it lacks the changelog. And this changelog
should be very convincing, otherwise I'm afraid the patch will be
ignored. It is not common to add the helper which has no users in
kernel.

> + * It also modifies the @timeout value so that if the sleep is
> interrupted
> + * by a signal, the caller can call this helper again with the updated
> + * timeout.

This is a bit misleading... If the task was interrupted, the next
call will check "condition" and return immediately because of
signal_pending(). We should return to the user-space before we
can do interruptible sleep again.


Why do you need this helper? Given that it is trivial to read
jiffies before and after wait_event_interruptible_timeout(),
it doesn't seem to buy too much.

Oleg.

--
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/