Stubbed out some more libc functions.
[planlOS.git] / programs / include / sys / select.h
bloba46d7c5c0f33f0a33cc00ab7ae34dbec13665077
1 /*
2 Copyright (C) 2008 Mathias Gottschlag
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in the
6 Software without restriction, including without limitation the rights to use,
7 copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
8 Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef SYS_SELECT_H_INCLUDED
23 #define SYS_SELECT_H_INCLUDED
25 #include <sys/types.h>
26 #include <time.h>
27 #include <signal.h>
29 struct timeval
31 time_t tv_sec;
32 suseconds_t tv_usec;
35 #define FD_SETSIZE 128
37 typedef struct fd_set
39 } fd_set;
41 void FD_CLR(int fd, fd_set *fdset);
42 int FD_ISSET(int fd, fd_set *fdset);
43 void FD_SET(int fd, fd_set *fdset);
44 void FD_ZERO(fd_set *fdset);
46 int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
47 const struct timespec *timeout, const sigset_t *sigmask);
48 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
49 struct timeval *timeout);
51 #endif