]> git.hungrycats.org Git - linux/commitdiff
[PATCH] make console_conditional_schedule() __sched and use cond_resched()
authorWilliam Lee Irwin III <wli@holomorphy.com>
Tue, 19 Oct 2004 01:11:56 +0000 (18:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:11:56 +0000 (18:11 -0700)
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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/printk.c

index c02ec626f384049d0d7547a143da72abbdd4e2fd..390396fc6d017ff1ce4c563daf1eaf2a963f1f0a 100644 (file)
@@ -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);