[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 08 Aug 2008 17:46:44 +0200
From: Krzysztof Halasa <khc@...waw.pl>
To: "Chris Friesen" <cfriesen@...tel.com>
Cc: Frans Meulenbroeks <fransmeulenbroeks@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: including .c files ?
"Chris Friesen" <cfriesen@...tel.com> writes:
>> Doesn't work when you need conditional compilation.
>
> Sure it does...look at all the kernel Makefiles that compile code
> based on whether a config option is set.
Nope, I meant compilation depending on preprocessor variables defined
(or not) by the including file. CONFIG_* and things like make
variables are completely different things.
Imagine a chip driver (library) doing I/O using either MMIO or
inp/outp. The real card driver uses the library and provides
necessary glue code. You can either a) make I/O real function calls,
call using pointers etc. (slow, should be inline), or b) define the
I/O as inline functions or macros and then #include the library.
--
Krzysztof Halasa
--
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