lkml.org 
[lkml]   [2005]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched hardcode non-smp set_cpus_allowed
Simplify the UP (1 CPU) implementatin of set_cpus_allowed.

The one CPU is hardcoded to be cpu 0 - so just test for
that bit, and avoid having to pick up the cpu_online_map.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

include/linux/sched.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

--- 2.6.14-rc5-mm1.orig/include/linux/sched.h 2005-10-27 00:26:36.000000000 -0700
+++ 2.6.14-rc5-mm1/include/linux/sched.h 2005-10-27 00:35:34.000000000 -0700
@@ -945,7 +945,7 @@ extern int set_cpus_allowed(task_t *p, c
#else
static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
{
- if (!cpus_intersects(new_mask, cpu_online_map))
+ if (!cpu_isset(0, new_mask))
return -EINVAL;
return 0;
}
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373, 1.925.600.0401
-
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-10-27 10:56    [W:0.061 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site