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

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Thu Jul 25 2002 - 11:07:43 EST


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/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:21 EST