Re: [PATCH 1/3] signal: sys_rt_sigtimedwait: simplify the timeout logic

From: Linus Torvalds
Date: Mon Apr 25 2011 - 15:39:07 EST


On Mon, Apr 25, 2011 at 10:56 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> Assuming that timespec_to_jiffies() always returns nonzero if ts is
> "not zero timeout". I think it does.

You really need to double-check that it does. We've not always done
that right, and while I think "round up" is the right thing to do
there, it had better be verified and then a comment added to make sure
it doesn't change.

But yes, with verification and comment, your "if (timeout) ..
timeout+1" would work fine.

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