summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-06 05:40:14 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-06 05:40:14 -0700
commit8ffcb67a9b54e5cf37ecc90b01f906b5f83920fb (patch)
tree267962a109db9a5f67606a31850187605f1977d8 /kernel
parent1e8bb0c57f53e35bef53e8588f46d8daaf9c2188 (diff)
[PATCH] use task_cpu() not ->thread_info->cpu in sched.c
From: Mikael Pettersson <mikpe@csd.uu.se> This patch fixes two p->thread_info->cpu occurrences in kernel/sched.c to use the task_cpu(p) macro instead, which is optimised on UP. Although one of the occurrences is under #ifdef CONFIG_SMP, it's bad style to use the raw non-optimisable form in non-arch code.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index bb552059577d..4f3d1fa42669 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -508,8 +508,8 @@ repeat_lock_task:
}
#ifdef CONFIG_SMP
else
- if (unlikely(kick) && task_running(rq, p) && (p->thread_info->cpu != smp_processor_id()))
- smp_send_reschedule(p->thread_info->cpu);
+ if (unlikely(kick) && task_running(rq, p) && (task_cpu(p) != smp_processor_id()))
+ smp_send_reschedule(task_cpu(p));
#endif
p->state = TASK_RUNNING;
}
@@ -1332,7 +1332,7 @@ pick_next_task:
switch_tasks:
prefetch(next);
clear_tsk_need_resched(prev);
- RCU_qsctr(prev->thread_info->cpu)++;
+ RCU_qsctr(task_cpu(prev))++;
if (likely(prev != next)) {
rq->nr_switches++;