… | |
… | |
234 | } |
234 | } |
235 | } |
235 | } |
236 | } |
236 | } |
237 | |
237 | |
238 | static int |
238 | static int |
239 | ev_epoll_create (void) |
239 | epoll_epoll_create (void) |
240 | { |
240 | { |
241 | int fd; |
241 | int fd; |
242 | |
242 | |
243 | #if defined EPOLL_CLOEXEC && !defined __ANDROID__ |
243 | #if defined EPOLL_CLOEXEC && !defined __ANDROID__ |
244 | fd = epoll_create1 (EPOLL_CLOEXEC); |
244 | fd = epoll_create1 (EPOLL_CLOEXEC); |
… | |
… | |
257 | |
257 | |
258 | inline_size |
258 | inline_size |
259 | int |
259 | int |
260 | epoll_init (EV_P_ int flags) |
260 | epoll_init (EV_P_ int flags) |
261 | { |
261 | { |
262 | if ((backend_fd = ev_epoll_create ()) < 0) |
262 | if ((backend_fd = epoll_epoll_create ()) < 0) |
263 | return 0; |
263 | return 0; |
264 | |
264 | |
265 | backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */ |
265 | backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */ |
266 | backend_modify = epoll_modify; |
266 | backend_modify = epoll_modify; |
267 | backend_poll = epoll_poll; |
267 | backend_poll = epoll_poll; |
… | |
… | |
284 | void |
284 | void |
285 | epoll_fork (EV_P) |
285 | epoll_fork (EV_P) |
286 | { |
286 | { |
287 | close (backend_fd); |
287 | close (backend_fd); |
288 | |
288 | |
289 | while ((backend_fd = ev_epoll_create ()) < 0) |
289 | while ((backend_fd = epoll_epoll_create ()) < 0) |
290 | ev_syserr ("(libev) epoll_create"); |
290 | ev_syserr ("(libev) epoll_create"); |
291 | |
291 | |
292 | fd_rearm_all (EV_A); |
292 | fd_rearm_all (EV_A); |
293 | } |
293 | } |
294 | |
294 | |