git » libfiu » commit 942e952

preload/posix: Add select(), pselect() and poll()

author Alberto Bertogli
2009-06-19 00:45:13 UTC
committer Alberto Bertogli
2009-06-19 00:45:13 UTC
parent d896135ef67cfdcb87a38a94383a0bc6220c055d

preload/posix: Add select(), pselect() and poll()

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

preload/posix/function_list +3 -0
preload/posix/modules/posix.io.mod +16 -0

diff --git a/preload/posix/function_list b/preload/posix/function_list
index 394a705..3a83717 100644
--- a/preload/posix/function_list
+++ b/preload/posix/function_list
@@ -36,6 +36,9 @@ send			posix/io/net/send
 sendto			posix/io/net/sendto
 sendmsg			posix/io/net/sendmsg
 shutdown		posix/io/net/shutdown
+select			posix/io/net/select
+pselect			posix/io/net/pselect
+poll			posix/io/net/poll
 
 opendir			posix/io/dir/opendir
 fdopendir		posix/io/dir/fdopendir
diff --git a/preload/posix/modules/posix.io.mod b/preload/posix/modules/posix.io.mod
index c8b40d9..a01f629 100644
--- a/preload/posix/modules/posix.io.mod
+++ b/preload/posix/modules/posix.io.mod
@@ -6,6 +6,8 @@ include: <sys/uio.h>
 include: <unistd.h>
 include: <sys/socket.h>
 include: <sys/stat.h>
+include: <sys/select.h>
+include: <poll.h>
 include: <fcntl.h>
 include: <errno.h>
 
@@ -154,4 +156,18 @@ int shutdown(int socket, int how);
 	on error: -1
 	valid errnos:  EBADF EINVAL ENOTCONN ENOTSOCK ENOBUFS
 
+int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, \
+		struct timeval *timeout);
+	on error: -1
+	valid errnos: EBADF EINTR EINVAL ENOMEM
+
+int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, \
+		const struct timespec *timeout, const sigset_t *sigmask);
+	on error: -1
+	valid errnos: EBADF EINTR EINVAL ENOMEM
+
+int poll(struct pollfd *fds, nfds_t nfds, int timeout);
+	on error: -1
+	valid errnos: EBADF EFAULT EINTR EINVAL ENOMEM
+