On 11/12, Peter Zijlstra wrote:
>
> On Tue, Nov 12, 2013 at 02:21:39PM -0000, David Laight wrote:
> >
> >     /* Tell scheduler we are going to sleep... */
> >     if (signal_pending(current))
> >         /* We don't want waking immediately (again) */
> >         sleep_state = TASK_UNINTERRUPTIBLE;
> >     else
> >         sleep_state = TASK_INTERRUPTIBLE;
> >     set_current_state(sleep_state);
>
> If this is for kernel threads, I think you can wipe the pending state;

Yes, unless this kthread does allow_signal() signal_pending() can't be
true.

Oleg.

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

Reply via email to