History log of /barrelfish-master/include/sys/select.h
Revision Date Author Comments
# dde2ba50 19-Jun-2017 Adam Turowski <adam.turowski@inf.ethz.ch>

libc: removing newlib, adding BSD libc
posixcompat: moving gettimeofday to libc
harness: adding a simple math test
lwip, lwip2: moving includes to /include, compiling with BSD headers

Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>


# e0ac6040 26-Jun-2013 Raphael Fuchs <fuchs.raphael@gmail.com>

posixcompat: Extend and fix the implementation of select() and cleanup headers.

* Extend select() with the ability to use pseudo-terminal master file
descriptors in the FD sets.

* Extend select() with the ability to cope with lwip sockets and our own
file descriptors at the same time.

* Extend select() so that it properly returns the errno codes EINVAL and
EBADF.

* Fixed implementation of select() when a timeout was specified. The previous
implementation re-registered the initial timeout in each loop iteration.

* Fixed implementation of select() so that it restores the waitsets associated
with the file descriptors to their original waitset and not the default
waitset.

* Implement the case that when timeout.tv_sec == 0 and timeout.tv_usec == 0,
select just polls but does not block. This is required by POSIX. Note that
this is not the same as when timeout == NULL. In the latter case we block
indefinitely.

* Move the definition of select() from unistd.h to sys/select.h as required by
the POSIX standard. The header sys/select.h is copied from FreeBSD and
adjusted to Barrelfish.

* In older versions of the POSIX standard select was defined in sys/time.h. For
compatability, we include sys/select.h in sys/time.h as suggested by the
POSIX standard.

* LWIP has its own definitions of FD_SETSIZE, FD_SET, FD_ISSET, FD_ZERO, FD_CLR.
Include sys/select.h in lwip/sockets.h so that our version are used.