[ccan] [PATCH 5/5] cpuid: only compile source file if x86 cpu

Ahmed Samy f.fallen45 at gmail.com
Tue Sep 24 18:04:40 EST 2013


On Tue, Sep 24, 2013 at 3:59 AM, David Gibson
<david at gibson.dropbear.id.au>wrote:

> What I was suggesting was populating the non-x86 side of the .h with
> static inlines using BUILD_ASSERT, so that you'll get a warning if you
> actually try to use any of the functions from here on non-x86.

I'm not quite sure what you mean by using BUILD_ASSERT, but what I get is:

#if x86 machine
define cpuid_*
#else
static inline type cpuid_*() { }
#endif

correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20130924/b7ce336b/attachment.html>


More information about the ccan mailing list