[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081107005229.53d6f2e3.akpm@linux-foundation.org>
Date: Fri, 7 Nov 2008 00:52:29 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Mike Travis <travis@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpumask: introduce new API, without changing anything
On Fri, 7 Nov 2008 09:40:16 +0100 Ingo Molnar <mingo@...e.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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists