Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

Andreas Steinmetz
2004-11-27T21:11:56Z

Sam Ravnborg wrote:
> On Thu, Nov 25, 2004 at 03:13:12PM +0000, David Howells wrote:
>
>>We've been discussing splitting the kernel headers into userspace API headers
>>and kernel internal headers and deprecating the __KERNEL__ macro. This will
>>permit a cleaner interface between the kernel and userspace; and one that's
>>easier to keep up to date.
>>
>>What we've come up with is this:
>>
>> (1) Create new directories in the linux sources to shadow existing include
>> directories:
>>
>> NEW DIRECTORY DIRECTORY SHADOWED
>> ============= ==================
>> include/user/ include/linux/
>> include/user-*/ include/asm-*/
>>
>> Note that this doesn't take account of the other directories under
>> include/, but I don't think they're relevant.
>
>
> If we go for some resturcturing of include/ then we should get rid of
> the annoying asm symlink. Following layout deals with that:
>
> include/<arch>/asm <= Files from include/asm-<arch>
> include/<arch>/mach* <= Files from include/mach-*
>
> This layout solve the symlink issue in an elegant way.
> We need to do trivial changes to compiler options to make it work. Changing
> compiler options is much more relaible than using symlinks.
>
> Then the userspace part would then be located in:
> include/<arch>/user-asm
>

This complicates things for bi-arch architectures like x86_64 where one
can use a dispatcher directory instead of a symlink to suit include/asm
for 32bit as well as 64bit.

--
Andreas Steinmetz SPAMmers use robotrap@domdv.de