Lines Matching refs:ioh
80 IOHandlerRecord* ioh = opaque;
81 ioh->running = 1;
83 ioh->fd_read(ioh->opaque);
85 if (!ioh->deleted && (events & LOOP_IO_WRITE) != 0) {
86 ioh->fd_write(ioh->opaque);
88 ioh->running = 0;
89 if (ioh->deleted) {
90 loopIo_done(ioh->io);
91 free(ioh);
100 IOHandlerRecord **pioh, *ioh;
105 ioh = *pioh;
106 if (ioh == NULL)
108 if (ioh->io->fd == fd) {
111 pioh = &ioh->next;
113 if (ioh->running) {
114 ioh->deleted = 1;
116 *pioh = ioh->next;
117 loopIo_done(ioh->io);
118 free(ioh);
121 for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
122 if (ioh->io->fd == fd)
125 ANEW0(ioh);
126 ioh->next = first_io_handler;
127 first_io_handler = ioh;
128 loopIo_init(ioh->io, mainLooper, fd, ioh_callback, ioh);
130 ioh->fd_read = fd_read;
131 ioh->fd_write = fd_write;
132 ioh->opaque = opaque;
135 loopIo_wantRead(ioh->io);
137 loopIo_dontWantRead(ioh->io);
140 loopIo_wantWrite(ioh->io);
142 loopIo_dontWantWrite(ioh->io);