[lkml]   [2004]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] Splitting kernel headers and deprecating __KERNEL__
    On Nov 25, 2004, at 10:13, 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.

    Yay!!! Finally!!!

    > ============= ==================
    > include/user/ include/linux/
    > include/user-*/ include/asm-*/

    How about include/abi for the platform-independent headers and
    for the platform-specific headers? Then include/arch would be
    symlinked to the
    correct arch-* directory.

    > Note that this doesn't take account of the other directories under
    > include/, but I don't think they're relevant.

    Perhaps such directories should either be broken out into
    pieces, or put into their own top-level directories.

    > (2) Take each file from the shadowed directory. If it has any
    > userspace
    > relevant stuff, then:

    Something like this would warn about incorrect uses of the linux/
    headers, yet
    still allow for a period of backwards compatibility. Once such period
    has passed,
    then linux/* would not even be installed, only abi/* and arch/*

    #ifndef _LINUX_FOO_H
    #define _LINUX_FOO_H 1

    #ifndef __KERNEL__
    # warning "Directly including <kernel/foo.h> is deprecated!!!"
    # warning "Please change your program to include <abi/foo.h> instead!!!"

    #include <abi/foo.h>

    #ifdef __KERNEL__
    /* Old __KERNEL__ contents of include/linux/foo.h */

    #endif /* not _LINUX_FOO_H */

    #ifndef _ABI_FOO_H
    #define_ABI_FOO_H 1

    #include <abi/bar.h>
    #include <arch/baz.h>

    /* Old non-__KERNEL__ contents of include/linux/foo.h */

    #endif /* not _ABI_FOO_H */

    Kyle Moffett

    Version: 3.12
    GCM/CS/IT/U d- s++: a17 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
    L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
    PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r
    ------END GEEK CODE BLOCK------

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:08    [W:0.023 / U:11.632 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site