Lines Matching defs:timeout
207 struct timeval *timeout)
214 if (epoch.tv_sec == 0 || timeout == NULL ||
215 (timeout->tv_sec == 0 && timeout->tv_usec == 0))
216 return syscall(SYS_select, nfds, rfds, wfds, xfds, timeout);
218 interval_deflate(timeout, &tv);
221 return syscall(SYS_select, nfds, rfds, wfds, xfds, timeout);
228 poll(struct pollfd fds[], nfds_t nfds, int timeout) {
234 if (timeout <= 0 || epoch.tv_sec == 0)
235 return syscall(SYS_poll, fds, nfds, timeout);
237 in.tv_sec = timeout / 1000;
238 in.tv_usec = (timeout % 1000) * 1000;
240 timeout = out.tv_sec * 1000 + out.tv_usec / 1000;
241 return syscall(SYS_poll, fds, nfds, timeout);
243 return syscall(SYS_poll, fds, nfds, timeout);
251 struct kevent *eventlist, int nevents, const struct timespec *timeout)
259 if (epoch.tv_sec == 0 || timeout == NULL ||
260 (timeout->tv_sec == 0 && timeout->tv_nsec == 0))
262 eventlist, nevents, timeout);
264 in.tv_sec = timeout->tv_sec;
265 in.tv_usec = timeout->tv_nsec / 1000;
273 nevents, timeout);
280 epoll_wait(int fd, struct epoll_event *events, int maxevents, int timeout) {
286 if (timeout == 0 || timeout == -1 || epoch.tv_sec == 0)
287 return syscall(SYS_epoll_wait, fd, events, maxevents, timeout);
289 in.tv_sec = timeout / 1000;
290 in.tv_usec = (timeout % 1000) * 1000;
292 timeout = out.tv_sec * 1000 + out.tv_usec / 1000;
293 return syscall(SYS_poll, fd, events, maxevents, timeout);
295 return syscall(SYS_poll, fd, events, maxevents, timeout);