Lines Matching refs:ev
32 static int fpm_event_epoll_add(struct fpm_event_s *ev);
33 static int fpm_event_epoll_remove(struct fpm_event_s *ev);
160 static int fpm_event_epoll_add(struct fpm_event_s *ev) /* {{{ */ in fpm_event_epoll_add() argument
170 e.data.fd = ev->fd; in fpm_event_epoll_add()
171 e.data.ptr = (void *)ev; in fpm_event_epoll_add()
173 if (ev->flags & FPM_EV_EDGE) { in fpm_event_epoll_add()
178 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ev->fd, &e) == -1) { in fpm_event_epoll_add()
179 zlog(ZLOG_ERROR, "epoll: unable to add fd %d", ev->fd); in fpm_event_epoll_add()
184 ev->index = ev->fd; in fpm_event_epoll_add()
192 static int fpm_event_epoll_remove(struct fpm_event_s *ev) /* {{{ */ in fpm_event_epoll_remove() argument
198 e.data.fd = ev->fd; in fpm_event_epoll_remove()
199 e.data.ptr = (void *)ev; in fpm_event_epoll_remove()
201 if (ev->flags & FPM_EV_EDGE) { in fpm_event_epoll_remove()
206 if (epoll_ctl(epollfd, EPOLL_CTL_DEL, ev->fd, &e) == -1) { in fpm_event_epoll_remove()
207 zlog(ZLOG_ERROR, "epoll: unable to remove fd %d", ev->fd); in fpm_event_epoll_remove()
212 ev->index = -1; in fpm_event_epoll_remove()