Lines Matching defs:io

155 static void glooper_delPendingIo(GLooper* looper, GLoopIo* io);
156 static void glooper_addIo(GLooper* looper, GLoopIo* io);
157 static void glooper_delIo(GLooper* looper, GLoopIo* io);
162 gloopio_modify(GLoopIo* io, unsigned wanted)
165 if (io->wanted == wanted)
170 if (io->ready != 0 && (io->ready & wanted) == 0) {
171 glooper_delPendingIo(io->looper, io);
173 io->ready &= wanted;
174 glooper_modifyFd(io->looper, io->fd, io->wanted, wanted);
175 io->wanted = wanted;
181 GLoopIo* io = impl;
182 gloopio_modify(io, io->wanted | LOOP_IO_READ);
188 GLoopIo* io = impl;
189 gloopio_modify(io, io->wanted | LOOP_IO_WRITE);
195 GLoopIo* io = impl;
196 gloopio_modify(io, io->wanted & ~LOOP_IO_READ);
202 GLoopIo* io = impl;
203 gloopio_modify(io, io->wanted & ~LOOP_IO_WRITE);
209 GLoopIo* io = impl;
210 return io->ready;
216 GLoopIo* io = impl;
217 if (io->ready != 0)
218 glooper_delPendingIo(io->looper, io);
220 glooper_delIo(io->looper, io);
221 AFREE(io);
237 GLoopIo* io;
239 ANEW0(io);
240 io->fd = fd;
241 io->callback = callback;
242 io->opaque = opaque;
243 io->looper = (GLooper*) looper;
244 io->wanted = 0;
245 io->ready = 0;
249 glooper_addIo(gg, io);
251 user->impl = io;
320 glooper_addIo(GLooper* looper, GLoopIo* io)
322 arefSet_add(looper->ios, io);
326 glooper_delIo(GLooper* looper, GLoopIo* io)
328 arefSet_del(looper->ios, io);
332 glooper_delPendingIo(GLooper* looper, GLoopIo* io)
334 arefSet_del(looper->pendingIos, io);
395 GLoopIo* io;
397 /* Add io waiters to the pending list */
398 AREFSET_FOREACH(looper->ios, io, {
399 if (io->wanted == 0)
404 if (iolooper_is_read(iol, io->fd))
407 if (iolooper_is_write(iol, io->fd))
410 io->ready = ready;
412 arefSet_add(looper->pendingIos, io);
451 GLoopIo* io;
452 AREFSET_FOREACH(looper->pendingIos,io,{
453 io->callback(io->opaque,io->fd,io->ready);