Messages in this thread | | | Date | Fri, 7 Nov 2008 00:52:29 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] cpumask: introduce new API, without changing anything |
| |
On Fri, 7 Nov 2008 09:40:16 +0100 Ingo Molnar <mingo@elte.hu> wrote:
> +#if NR_CPUS == 1 > +/* Uniprocesor. */ > +#define cpumask_first(src) ({ (void)(src); 0; }) > > ... > > +#else > +static inline unsigned int cpumask_first(const struct cpumask *srcp) > +{ > + return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits); > +} > > ... > > +#endif /* SMP */
So I can happily compile and run
cpumask_first("hello, world");
with CONFIG_SMP=n?
| |