Lines Matching refs:ev
263 evmap_io_add(struct event_base *base, evutil_socket_t fd, struct event *ev) in evmap_io_add() argument
272 EVUTIL_ASSERT(fd == ev->ev_fd); in evmap_io_add()
294 if (ev->ev_events & EV_READ) { in evmap_io_add()
298 if (ev->ev_events & EV_WRITE) { in evmap_io_add()
309 (old_ev->ev_events&EV_ET) != (ev->ev_events&EV_ET)) { in evmap_io_add()
320 if (evsel->add(base, ev->ev_fd, in evmap_io_add()
321 old, (ev->ev_events & EV_ET) | res, extra) == -1) in evmap_io_add()
328 TAILQ_INSERT_TAIL(&ctx->events, ev, ev_io_next); in evmap_io_add()
336 evmap_io_del(struct event_base *base, evutil_socket_t fd, struct event *ev) in evmap_io_del() argument
347 EVUTIL_ASSERT(fd == ev->ev_fd); in evmap_io_del()
364 if (ev->ev_events & EV_READ) { in evmap_io_del()
369 if (ev->ev_events & EV_WRITE) { in evmap_io_del()
377 if (evsel->del(base, ev->ev_fd, old, res, extra) == -1) in evmap_io_del()
384 TAILQ_REMOVE(&ctx->events, ev, ev_io_next); in evmap_io_del()
394 struct event *ev; in evmap_io_active() local
402 TAILQ_FOREACH(ev, &ctx->events, ev_io_next) { in evmap_io_active()
403 if (ev->ev_events & events) in evmap_io_active()
404 event_active_nolock(ev, ev->ev_events & events, 1); in evmap_io_active()
418 evmap_signal_add(struct event_base *base, int sig, struct event *ev) in evmap_signal_add() argument
433 if (evsel->add(base, ev->ev_fd, 0, EV_SIGNAL, NULL) in evmap_signal_add()
438 TAILQ_INSERT_TAIL(&ctx->events, ev, ev_signal_next); in evmap_signal_add()
444 evmap_signal_del(struct event_base *base, int sig, struct event *ev) in evmap_signal_del() argument
456 if (evsel->del(base, ev->ev_fd, 0, EV_SIGNAL, NULL) == -1) in evmap_signal_del()
460 TAILQ_REMOVE(&ctx->events, ev, ev_signal_next); in evmap_signal_del()
470 struct event *ev; in evmap_signal_active() local
475 TAILQ_FOREACH(ev, &ctx->events, ev_signal_next) in evmap_signal_active()
476 event_active_nolock(ev, EV_SIGNAL, ncalls); in evmap_signal_active()
735 struct event *ev; local
744 TAILQ_FOREACH(ev, &base->eventqueue, ev_next) {
745 EVUTIL_ASSERT(ev->ev_flags & EVLIST_INSERTED);
746 EVUTIL_ASSERT(ev->ev_flags & EVLIST_INIT);
747 ev->ev_flags &= ~(EVLIST_X_SIGFOUND|EVLIST_X_IOFOUND);
762 TAILQ_FOREACH(ev, &ctx->events, ev_io_next) {
763 EVUTIL_ASSERT(!(ev->ev_flags & EVLIST_X_IOFOUND));
764 EVUTIL_ASSERT(ev->ev_fd == i);
765 ev->ev_flags |= EVLIST_X_IOFOUND;
775 TAILQ_FOREACH(ev, &ctx->events, ev_signal_next) {
776 EVUTIL_ASSERT(!(ev->ev_flags & EVLIST_X_SIGFOUND));
777 EVUTIL_ASSERT(ev->ev_fd == i);
778 ev->ev_flags |= EVLIST_X_SIGFOUND;
783 TAILQ_FOREACH(ev, &base->eventqueue, ev_next) {
784 if (ev->ev_events & (EV_READ|EV_WRITE)) {
785 EVUTIL_ASSERT(ev->ev_flags & EVLIST_X_IOFOUND);
788 if (ev->ev_events & EV_SIGNAL) {
789 EVUTIL_ASSERT(ev->ev_flags & EVLIST_X_SIGFOUND);