lkml.org 
[lkml]   [2004]   [Apr]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 22 Apr 2004 00:07:59 -0700
FromPaul Jackson <>
Subject[Patch 17 of 17] cpumask v4 - Cpumask code clarification in kernel/sched.c
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@sgi.com> 1.650.933.1373
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008