Re: [PATCH] sched hardcode non-smp set_cpus_allowed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux