Lines Matching refs:io
45 void io_loop_handle_add(struct io_file *io)
47 struct ioloop_handler_context *ctx = io->io.ioloop->handler_context;
48 enum io_condition condition = io->io.condition;
50 int index, old_events, fd = io->fd;
97 void io_loop_handle_remove(struct io_file *io, bool closed ATTR_UNUSED)
99 struct ioloop_handler_context *ctx = io->io.ioloop->handler_context;
100 enum io_condition condition = io->io.condition;
101 int index, fd = io->fd;
113 if (fcntl(io->fd, F_GETFD, 0) < 0) {
115 i_panic("io_remove(%d) called too late", io->fd);
117 i_error("fcntl(%d, F_GETFD) failed: %m", io->fd);
121 i_free(io);
149 struct io_file *io;
176 io = ioloop->io_files;
177 for (; io != NULL && ret > 0; io = ioloop->next_io_file) {
178 ioloop->next_io_file = io->next;
180 pollfd = &ctx->fds[ctx->fd_index[io->fd]];
184 io->fd, (void *) io->io.callback);
188 } else if ((io->io.condition &
192 } else if ((io->io.condition & IO_READ) != 0) {
195 } else if ((io->io.condition & IO_WRITE) != 0) {
198 } else if ((io->io.condition & IO_ERROR) != 0) {
209 io_loop_call_io(&io->io);