[Patch 17 of 17] cpumask v4 - Cpumask code clarification inkernel/sched.c

From: Paul Jackson
Date: Thu Apr 22 2004 - 02:14:07 EST


mask17-cpumask-sched-refine - Cpumask code clarification in kernel/sched.c
Clarify and slightly optimize set_cpus_allowed() cpumask check

Index: 2.6.5.bitmap.v4/kernel/sched.c
===================================================================
--- 2.6.5.bitmap.v4.orig/kernel/sched.c 2004-04-21 16:45:03.000000000 -0700
+++ 2.6.5.bitmap.v4/kernel/sched.c 2004-04-21 16:45:17.000000000 -0700
@@ -2722,7 +2722,7 @@
runqueue_t *rq;

rq = task_rq_lock(p, &flags);
- if (any_online_cpu(new_mask) == NR_CPUS) {
+ if (!cpus_intersects(new_mask, cpu_online_map)) {
ret = -EINVAL;
goto out;
}


--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
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/