[PATCH] fix two unwrapped uses of thread_info->cpu

Mikael Pettersson (mikpe@csd.uu.se)
Thu, 25 Jul 2002 18:07:43 +0200 (MET DST)


This patch for 2.5.28 fixes two explicit accesses to thread_info->cpu
in generic code to use the new UP-optimised macros instead.

/Mikael

diff -ruN linux-2.5.28/fs/proc/array.c linux-2.5.28.up-opt/fs/proc/array.c
--- linux-2.5.28/fs/proc/array.c Thu Jul 25 01:27:31 2002
+++ linux-2.5.28.up-opt/fs/proc/array.c Thu Jul 25 01:36:09 2002
@@ -386,7 +386,7 @@
task->nswap,
task->cnswap,
task->exit_signal,
- task->thread_info->cpu,
+ task_cpu(task),
task->rt_priority,
task->policy);
if(mm)
diff -ruN linux-2.5.28/kernel/sched.c linux-2.5.28.up-opt/kernel/sched.c
--- linux-2.5.28/kernel/sched.c Thu Jul 25 01:27:31 2002
+++ linux-2.5.28.up-opt/kernel/sched.c Thu Jul 25 01:42:20 2002
@@ -357,7 +357,7 @@
*/
void kick_if_running(task_t * p)
{
- if ((task_running(task_rq(p), p)) && (p->thread_info->cpu != smp_processor_id()))
+ if ((task_running(task_rq(p), p)) && (task_cpu(p) != smp_processor_id()))
resched_task(p);
}

-
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/