Lines Matching refs:io
66 struct io_file *io;
69 io = list->ios[i];
71 if (io == NULL)
74 if ((io->io.condition & IO_READ) != 0)
76 if ((io->io.condition & IO_WRITE) != 0)
78 if ((io->io.condition & IO_ERROR) != 0)
85 void io_loop_handle_add(struct io_file *io)
87 struct ioloop_handler_context *ctx = io->io.ioloop->handler_context;
93 list = array_idx_get_space(&ctx->fd_index, io->fd);
97 first = ioloop_iolist_add(*list, io);
105 if (epoll_ctl(ctx->epfd, op, io->fd, &event) < 0) {
108 "(fd doesn't support epoll%s)", io->fd,
109 io->fd != STDIN_FILENO ? "" :
113 op == EPOLL_CTL_ADD ? "add" : "mod", io->fd);
126 void io_loop_handle_remove(struct io_file *io, bool closed)
128 struct ioloop_handler_context *ctx = io->io.ioloop->handler_context;
134 list = array_idx_modifiable(&ctx->fd_index, io->fd);
135 last = ioloop_iolist_del(*list, io);
144 if (epoll_ctl(ctx->epfd, op, io->fd, &event) < 0) {
147 op == EPOLL_CTL_DEL ? "del" : "mod", io->fd);
160 i_free(io);
169 struct io_file *io;
207 io = list->ios[j];
208 if (io == NULL)
214 else if ((io->io.condition & IO_READ) != 0)
216 else if ((io->io.condition & IO_WRITE) != 0)
218 else if ((io->io.condition & IO_ERROR) != 0)
222 io_loop_call_io(&io->io);