Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738#include "select.h"#include "../base.h"#include "../errno.h"#include <stddef.h>#include <linux-syscalls/linux.h>#include "../bsdthread/cancelable.h"
long sys_select(int nfds, void* rfds, void* wfds, void* efds, struct bsd_timeval* timeout){ CANCELATION_POINT(); return sys_select_nocancel(nfds, rfds, wfds, efds, timeout);}
long sys_select_nocancel(int nfds, void* rfds, void* wfds, void* efds, struct bsd_timeval* timeout){ int ret; struct linux_timeval ltv;
if (timeout != NULL) { ltv.tv_sec = timeout->tv_sec; ltv.tv_usec = timeout->tv_usec; }
#ifdef __NR__newselect ret = LINUX_SYSCALL(__NR__newselect, nfds, rfds, wfds, efds, (timeout != NULL) ? <v : NULL);#else ret = LINUX_SYSCALL(__NR_select, nfds, rfds, wfds, efds, (timeout != NULL) ? <v : NULL);#endif if (ret < 0) ret = errno_linux_to_bsd(ret);
return ret;}