lkml.org 
[lkml]   [2007]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: schedule_timeout() called with state TASK_RUNNING from fs/select.c
Robert P. J. Day wrote:
>
> as i understand it, schedule_timeout() should always be called with
> a current->state of TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE, no?

No.

Yes, it is pointless to call schedule() if it is known that ->state ==
TASK_RUNNING, but sometimes the task doesn't know its state when it
calls schedule/schedule_timeout, the state could be changed by
try_to_wake_up().

See wait_event_timeout() as an example.

Oleg.

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

\
 
 \ /
  Last update: 2007-07-08 13:19    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site