etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / select.c
blobadc8c8193f800b638d02143d5a5cbbf7d2d68d6a
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <string.h>
6 #include <sys/time.h>
7 #include <sys/select.h>
9 int select(int nfds,
10 fd_set *readfds, fd_set *writefds, fd_set *errorfds,
11 struct timeval *timeout)
13 message m;
15 memset(&m, 0, sizeof(m));
16 m.m_lc_vfs_select.nfds = nfds;
17 m.m_lc_vfs_select.readfds = readfds;
18 m.m_lc_vfs_select.writefds = writefds;
19 m.m_lc_vfs_select.errorfds = errorfds;
20 m.m_lc_vfs_select.timeout = (vir_bytes)timeout;
22 return (_syscall(VFS_PROC_NR, VFS_SELECT, &m));
26 #if defined(__minix) && defined(__weak_alias)
27 __weak_alias(select, __select50)
28 #endif