… | |
… | |
87 | if (epoll_fd < 0) |
87 | if (epoll_fd < 0) |
88 | return 0; |
88 | return 0; |
89 | |
89 | |
90 | fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); |
90 | fcntl (epoll_fd, F_SETFD, FD_CLOEXEC); |
91 | |
91 | |
92 | method_fudge = 1e-3; /* needed to compensate for epoll returning early */ |
92 | backend_fudge = 1e-3; /* needed to compensate for epoll returning early */ |
93 | method_modify = epoll_modify; |
93 | backend_modify = epoll_modify; |
94 | method_poll = epoll_poll; |
94 | backend_poll = epoll_poll; |
95 | |
95 | |
96 | epoll_eventmax = 64; /* intiial number of events receivable per poll */ |
96 | epoll_eventmax = 64; /* intiial number of events receivable per poll */ |
97 | epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); |
97 | epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); |
98 | |
98 | |
99 | return EVBACKEND_EPOLL; |
99 | return EVBACKEND_EPOLL; |