[lkml]   [2001]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: asm/unistd.h

    Steve Grubb writes:
    > It would seem to me that after hearing how the macros are used in practice,
    > wouldn't turning them into inline functions be an improvement? This is
    > something gcc supports, it accomplishes the same thing, and has the added
    > advantage of type checking.

    Two reasons:

    1) Sometimes I don't want any type checking because it would create
    the necessity of adding a new include to a file --> a circular
    dependency to resolve. Macros hide the types except in the
    cases where they are actually invoked :-)

    2) Historically GCC was very bad with code generation with inline
    functions, so at that time the GCC manual statement "inline
    functions are just like a macro" was technically false :-)

    Yes, I know this is much different in today's gcc tree, but
    there hasn't been a gcc release in over 2 years so...

    David S. Miller
    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 13:24    [W:0.021 / U:146.280 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site