Re: [PATCH 4/6 OPTION-A version 3] completion: Add new wait_for_completion_timeout_state

From: Boaz Harrosh
Date: Wed Mar 28 2012 - 14:21:11 EST

On 03/27/2012 01:11 AM, Peter Zijlstra wrote:

> On Mon, 2012-03-26 at 19:33 -0700, Boaz Harrosh wrote:
> So I'm fine with adding wait_for_completion_timeout_state(), but make it
> look and smell like wait_for_completion_timeout() and use a proper
> state, like wake_up_state().
> IOW:
> unsigned long __sched
> wait_for_completion_timeout_state(struct completion *x,
> unsigned long timeout,
> unsigned int state)
> {
> return wait_for_common(x, timeout, state);
> }
> EXPORT_SYMBOL(wait_for_completion_timeout_state);

Looks good thanks It's what I had at first, and went
overboard with it. KISS right?

I'll resend and use it as is? Should I add a BUG_ON
if state is not one of:

Thanks Peter, this will help me a lot
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at