Lines Matching refs:io
9 struct io *io_notify_fd_add(struct ioloop_notify_fd_context *ctx, int fd,
12 struct io_notify *io;
14 io = i_new(struct io_notify, 1);
15 io->io.condition = IO_NOTIFY;
16 io->io.callback = callback;
17 io->io.context = context;
18 io->io.ioloop = current_ioloop;
19 io->fd = fd;
22 ctx->notifies->prev = io;
23 io->next = ctx->notifies;
25 ctx->notifies = io;
26 return &io->io;
30 struct io_notify *io)
32 if (io->prev != NULL)
33 io->prev->next = io->next;
35 ctx->notifies = io->next;
37 if (io->next != NULL)
38 io->next->prev = io->prev;
39 i_free(io);
45 struct io_notify *io;
47 for (io = ctx->notifies; io != NULL; io = io->next) {
48 if (io->fd == fd)
49 return io;