Commit 4492bf66 authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[PATCH] make console_conditional_schedule() __sched and use cond_resched()

Relatively minor add-on (not necessarily tied to it or required to be taken
or a fix for any bug).  Since cond_resched() is using PREEMPT_ACTIVE now,
it may be useful to update the open-coded instance of cond_resched() to use
the generic call.  Also, it should probably be __sched so the caller shows
up in wchan.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent be3ba4f4
......@@ -661,12 +661,10 @@ EXPORT_SYMBOL(release_console_sem);
*
* Must be called within acquire_console_sem().
*/
void console_conditional_schedule(void)
void __sched console_conditional_schedule(void)
{
if (console_may_schedule && need_resched()) {
set_current_state(TASK_RUNNING);
schedule();
}
if (console_may_schedule)
cond_resched();
}
EXPORT_SYMBOL(console_conditional_schedule);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment