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