… | |
… | |
226 | unsigned char events = anfds [fd].events & (EV_READ | EV_WRITE); |
226 | unsigned char events = anfds [fd].events & (EV_READ | EV_WRITE); |
227 | |
227 | |
228 | if (anfds [fd].emask & EV_EMASK_EPERM && events) |
228 | if (anfds [fd].emask & EV_EMASK_EPERM && events) |
229 | fd_event (EV_A_ fd, events); |
229 | fd_event (EV_A_ fd, events); |
230 | else |
230 | else |
|
|
231 | { |
231 | epoll_eperms [i] = epoll_eperms [--epoll_epermcnt]; |
232 | epoll_eperms [i] = epoll_eperms [--epoll_epermcnt]; |
|
|
233 | anfds [fd].emask = 0; |
|
|
234 | } |
232 | } |
235 | } |
233 | } |
236 | } |
234 | |
237 | |
235 | int inline_size |
238 | int inline_size |
236 | epoll_init (EV_P_ int flags) |
239 | epoll_init (EV_P_ int flags) |
237 | { |
240 | { |
238 | #ifdef EPOLL_CLOEXEC |
241 | #ifdef EPOLL_CLOEXEC |
239 | backend_fd = epoll_create1 (EPOLL_CLOEXEC); |
242 | backend_fd = epoll_create1 (EPOLL_CLOEXEC); |
240 | |
243 | |
241 | if (backend_fd < 0) |
244 | if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS)) |
242 | #endif |
245 | #endif |
243 | backend_fd = epoll_create (256); |
246 | backend_fd = epoll_create (256); |
244 | |
247 | |
245 | if (backend_fd < 0) |
248 | if (backend_fd < 0) |
246 | return 0; |
249 | return 0; |