Lines Matching refs:epollop
56 struct epollop {
111 struct epollop *epollop;
123 if (!(epollop = mm_calloc(1, sizeof(struct epollop)))) {
128 epollop->epfd = epfd;
131 epollop->events = mm_calloc(INITIAL_NEVENT, sizeof(struct epoll_event));
132 if (epollop->events == NULL) {
133 mm_free(epollop);
137 epollop->nevents = INITIAL_NEVENT;
146 return (epollop);
175 struct epollop *epollop,
265 if (epoll_ctl(epollop->epfd, op, ch->fd, &epev) == -1) {
271 if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, ch->fd, &epev) == -1) {
288 if (epoll_ctl(epollop->epfd, EPOLL_CTL_MOD, ch->fd, &epev) == -1) {
336 struct epollop *epollop = base->evbase;
344 if (epoll_apply_one_change(base, epollop, ch) < 0)
388 struct epollop *epollop = base->evbase;
389 struct epoll_event *events = epollop->events;
407 res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout);
421 EVUTIL_ASSERT(res <= epollop->nevents);
442 if (res == epollop->nevents && epollop->nevents < MAX_NEVENT) {
445 int new_nevents = epollop->nevents * 2;
448 new_events = mm_realloc(epollop->events,
451 epollop->events = new_events;
452 epollop->nevents = new_nevents;
463 struct epollop *epollop = base->evbase;
466 if (epollop->events)
467 mm_free(epollop->events);
468 if (epollop->epfd >= 0)
469 close(epollop->epfd);
471 memset(epollop, 0, sizeof(struct epollop));
472 mm_free(epollop);