Messages in this thread | | | Subject | Re: [PATCH] sched hardcode non-smp set_cpus_allowed | From | Rusty Russell <> | Date | Sat, 29 Oct 2005 11:33:37 +1000 |
| |
On Thu, 2005-10-27 at 01:53 -0700, Paul Jackson wrote: > @@ -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; > }
Hmm, I do slightly prefer the former, since it is exactly the same as the SMP case, and doesn't hardcode 0. Perhaps worth making cpu_online_map a literal "1" for the UP case, which will help everywhere. With our include web, however, that might be tricky.
Rusty. -- A bad analogy is like a leaky screwdriver -- Richard Braakman
- 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/
| |