aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2005-10-30 18:03:21 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:28 -0500
commit4098f9918e068e51fed1727f6ba80efcec372378 (patch)
tree0495f14e29ad93c165988be49c70ec658fffd086 /include
parent70a6a0cb92f24fd6bbe2e75299168909f735676a (diff)
[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. Also, unexport cpu_online_map: it was only needed for set_cpus_allowed(). Signed-off-by: Paul Jackson <pj@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b2d2dc14f0b9..41285a0e7258 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -940,7 +940,7 @@ extern int set_cpus_allowed(task_t *p, cpumask_t new_mask);
940#else 940#else
941static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) 941static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
942{ 942{
943 if (!cpus_intersects(new_mask, cpu_online_map)) 943 if (!cpu_isset(0, new_mask))
944 return -EINVAL; 944 return -EINVAL;
945 return 0; 945 return 0;
946} 946}