HAL on OLPC (removing acpi, apm and pmu)
Johannes Berg
johannes at sipsolutions.net
Sun Dec 10 12:24:10 PST 2006
On Sun, 2006-12-10 at 20:14 +0000, Richard Hughes wrote:
> This sounds much better than the way I've done this. Would the
> Makefile.am just include the acpi.c file if HAVE_ACPI is defined and
> unconditionally include acpi.h?
Uh, I'm not sure about Makefile.am but I suppose so since acpi.h would
be included unconditionally in the sources that require functions from
acpi.c (unless they're stubbed with static inlines)
> Will they? Surely a static inline function returning a single value will
> be optimized out? Maybe I have more faith in GCC than I should. ;-)
Oh, yes, that ought to be optimised out, but if you have
switch (something) {
...
case NEVER_HAPPENS:
ev = call_static_inline_something()
break;
}
then I suspect that the compiler will still generate at least some code
for the "case NEVER_HAPPENS" although it might optimise against the
default case.
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/hal/attachments/20061210/1bceb698/attachment.pgp
More information about the hal
mailing list