minix/include/sys/select.h
Ben Gras e44e9ad261 small compile fixes; initial select() stubs; release.sh script doesn't
need /tmp any more since 16MB root device; increase to 3.0.5 to make new
CD with working FXP driver. (not tagged 3.0.5 yet as at driver bios-copy
workaround hasn't been done.)
2005-06-06 11:40:32 +00:00

37 lines
937 B
C
Executable file

#ifndef _SYS_SELECT_H
#define _SYS_SELECT_H 1
#ifdef _POSIX_SOURCE
#include <time.h>
#include <sys/types.h>
#include <limits.h>
/* Use this datatype as basic storage unit in fd_set */
typedef u32_t _fdsetword;
/* This many bits fit in an fd_set word. */
#define _FDSETBITSPERWORD (sizeof(_fdsetword)*8)
/* We want to store OPEN_MAX fd bits. */
#define _FDSETWORDS ((OPEN_MAX+_FDSETBITSPERWORD-1)/_FDSETBITSPERWORD)
/* This means we can store all of OPEN_MAX. */
#define FD_SETSIZE OPEN_MAX
typedef struct {
_fdsetword _fdsetval[_FDSETWORDS];
} fd_set;
_PROTOTYPE( int select, (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) );
_PROTOTYPE( void FD_CLR, (int fd, fd_set *fdset));
_PROTOTYPE( void FD_ISSET, (int fd, fd_set *fdset));
_PROTOTYPE( void FD_SET, (int fd, fd_set *fdset));
_PROTOTYPE( void FD_ZERO, (fd_set *fdset));
#endif /* _POSIX_SOURCE */
#endif /* _SYS_SELECT_H */