Re: [PATCH 21/21] posix_types: Remove fd_set macros

From: H. Peter Anvin
Date: Wed Feb 08 2012 - 16:31:08 EST


On 02/08/2012 01:24 PM, David Howells wrote:
H. Peter Anvin<hpa@xxxxxxxxx> wrote:

Anyway, select() paraphernalia goes in<sys/time.h> (as opposed to
<time.h>), poll() paraphernalia goes in<sys/poll.h>, and the linux/*
files mimics that.

That doesn't seem to be so - at least not for my copy of glibc:

/usr/include/sys/select.h:/* fd_set for select and pselect. */
/usr/include/sys/select.h: } fd_set;
/usr/include/sys/select.h:#define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)

Besides, this is inside the kernel. The I/O polling architecture definitions
(which includes select) ought to be in one place there, not spread out all
over the place.


I think <sys/select.h> is more recent, but anyway, look at the existing <linux/time.h> and you see why it's there.

It's fine to say it shouldn't be, but then ALL the definitions should move (and that should be a separate change from this patchset)... but do note that some of those macro definitions (which I did NOT change) are exported to user space so make those changes with care.

-hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/