[PATCH][2.6.4-rc1] use set_task_cpu() in kthread_bind()

From: Mikael Pettersson
Date: Sat Feb 28 2004 - 06:27:41 EST


Use set_task_cpu() instead of direct assignment to ->cpu in
kthread_bind(), as this eliminates the assignment on UP.

--- linux-2.6.4-rc1/kernel/kthread.c.~1~ 2004-02-28 11:15:23.000000000 +0100
+++ linux-2.6.4-rc1/kernel/kthread.c 2004-02-28 12:02:10.000000000 +0100
@@ -131,7 +131,7 @@
void kthread_bind(struct task_struct *k, unsigned int cpu)
{
BUG_ON(k->state != TASK_INTERRUPTIBLE);
- k->thread_info->cpu = cpu;
+ set_task_cpu(k, cpu);
k->cpus_allowed = cpumask_of_cpu(cpu);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/