[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1441983308.2083.13.camel@sipsolutions.net>
Date: Fri, 11 Sep 2015 16:55:08 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jason Baron <jbaron@...mai.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: static key arrays?
On Fri, 2015-09-11 at 16:41 +0200, Rasmus Villemoes wrote:
>
> That's inconvenient for large arrays. I think the 'or something' would
> be the range initialization supported by gcc (and I think also clang):
>
> struct static_key_false array[N] = { [0 ... N-1] = STATIC_KEY_FALSE_INIT };
>
Ah, I wasn't aware of that extension. That's indeed much more
convenient than the CPP trick I was thinking of :)
johannes
--
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