1*433d6423SLionel Sambuc #include <sys/cdefs.h>
2*433d6423SLionel Sambuc #include <lib.h>
3*433d6423SLionel Sambuc #include "namespace.h"
4*433d6423SLionel Sambuc
5*433d6423SLionel Sambuc #include <string.h>
6*433d6423SLionel Sambuc #include <sys/time.h>
7*433d6423SLionel Sambuc #include <sys/select.h>
8*433d6423SLionel Sambuc
select(int nfds,fd_set * readfds,fd_set * writefds,fd_set * errorfds,struct timeval * timeout)9*433d6423SLionel Sambuc int select(int nfds,
10*433d6423SLionel Sambuc fd_set *readfds, fd_set *writefds, fd_set *errorfds,
11*433d6423SLionel Sambuc struct timeval *timeout)
12*433d6423SLionel Sambuc {
13*433d6423SLionel Sambuc message m;
14*433d6423SLionel Sambuc
15*433d6423SLionel Sambuc memset(&m, 0, sizeof(m));
16*433d6423SLionel Sambuc m.m_lc_vfs_select.nfds = nfds;
17*433d6423SLionel Sambuc m.m_lc_vfs_select.readfds = readfds;
18*433d6423SLionel Sambuc m.m_lc_vfs_select.writefds = writefds;
19*433d6423SLionel Sambuc m.m_lc_vfs_select.errorfds = errorfds;
20*433d6423SLionel Sambuc m.m_lc_vfs_select.timeout = (vir_bytes)timeout;
21*433d6423SLionel Sambuc
22*433d6423SLionel Sambuc return (_syscall(VFS_PROC_NR, VFS_SELECT, &m));
23*433d6423SLionel Sambuc }
24*433d6423SLionel Sambuc
25*433d6423SLionel Sambuc
26*433d6423SLionel Sambuc #if defined(__minix) && defined(__weak_alias)
27*433d6423SLionel Sambuc __weak_alias(select, __select50)
28*433d6423SLionel Sambuc #endif
29