2019-01-16 22:41:13 -02:00
|
|
|
#include <sys/select.h>
|
|
|
|
|
#include <Kernel/Syscall.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
2019-01-23 03:53:01 -02:00
|
|
|
extern "C" {
|
|
|
|
|
|
2019-01-16 22:41:13 -02:00
|
|
|
int select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, struct timeval* timeout)
|
|
|
|
|
{
|
|
|
|
|
Syscall::SC_select_params params { nfds, readfds, writefds, exceptfds, timeout };
|
|
|
|
|
int rc = syscall(SC_select, ¶ms);
|
|
|
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
|
|
|
}
|
2019-01-23 03:53:01 -02:00
|
|
|
|
|
|
|
|
}
|