diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2005-01-07 21:47:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 21:47:03 -0800 |
commit | 5c73274566f2e9dab8f5844c6560067dfb0c3611 (patch) | |
tree | 87bd81e90bb49183b2f8c2de0d6e1c36097d02d6 /kernel | |
parent | 2cf52d5c5c9d81f2d158312c1ab2b6b3ec856bbb (diff) | |
download | history-5c73274566f2e9dab8f5844c6560067dfb0c3611.tar.gz |
[PATCH] sched: use cached current value
schedule() can use prev instead of get_current().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index e11c5e53994f21..994ef2e9b912bb 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2551,7 +2551,7 @@ need_resched_nonpreemptible: * The idle thread is not allowed to schedule! * Remove this check after it has been exercised a bit. */ - if (unlikely(current == rq->idle) && current->state != TASK_RUNNING) { + if (unlikely(prev == rq->idle) && prev->state != TASK_RUNNING) { printk(KERN_ERR "bad: scheduling from the idle thread!\n"); dump_stack(); } @@ -2571,8 +2571,8 @@ need_resched_nonpreemptible: spin_lock_irq(&rq->lock); - if (unlikely(current->flags & PF_DEAD)) - current->state = EXIT_DEAD; + if (unlikely(prev->flags & PF_DEAD)) + prev->state = EXIT_DEAD; /* * if entering off of a kernel preemption go straight * to picking the next task. |