Re: [PATCH] cpumask: introduce new API, without changing anything
From: Andrew Morton
Date: Fri Nov 07 2008 - 03:53:08 EST
On Fri, 7 Nov 2008 09:40:16 +0100 Ingo Molnar <mingo@xxxxxxx> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/