[lkml]   [2012]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] posix_types.h: make __NFDBITS match glibc definition
    On Tue, Jul 24, 2012 at 12:59 PM, Linus Torvalds
    <> wrote:
    > And I suspect (but it must be before even the old bitkeeper tree) that
    > we *used* to implement __FD_ISSET() long ago. We removed it, and
    > nobody used it, so nobody even noticed that we removed it - but left
    > some now unused stuff behind.

    Nope, I found it. It was in the arch-specific header files, and then
    moved to asm-generic, and then removed entirely by commit 8b3d1cda4f5f
    ("posix_types: Remove fd_set macros"). Fairly recently, in fact

    But even before they were removed, they were inside #ifdef __KERNEL__
    protection, so it wasn't available to user code.

    And to be *really* crazy, it turns out that by the time we removed
    those __FD_ISSET() etc macros, they didn't even use the helper macros
    any more. So instead of using

    #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))

    (like the original arch-specific ones had done), we had already
    implicitly stopped using those macros inside the kernel when we moved
    to the generic version (that did all this by hand in inline

    So the only users of __FDELT/__FDMASK seem to have gone away many
    moons ago. I really don't think that any sane user space could be
    using those left-over helpers.

    Of course, the magic word there is "sane". I'm sure there are insane
    users somewhere. But I don't think we should care.


     \ /
      Last update: 2012-07-24 23:01    [W:0.021 / U:73.340 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site