… | |
… | |
232 | if (backend_fd < 0) |
232 | if (backend_fd < 0) |
233 | return 0; |
233 | return 0; |
234 | |
234 | |
235 | fcntl (backend_fd, F_SETFD, FD_CLOEXEC); |
235 | fcntl (backend_fd, F_SETFD, FD_CLOEXEC); |
236 | |
236 | |
237 | backend_fudge = 0.; /* kernel sources seem to indicate this to be zero */ |
237 | backend_fudge = 1./1024.; /* epoll does sometimes return early, this is just to avoid the worst */ |
238 | backend_modify = epoll_modify; |
238 | backend_modify = epoll_modify; |
239 | backend_poll = epoll_poll; |
239 | backend_poll = epoll_poll; |
240 | |
240 | |
241 | epoll_eventmax = 64; /* initial number of events receivable per poll */ |
241 | epoll_eventmax = 64; /* initial number of events receivable per poll */ |
242 | epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); |
242 | epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); |