Lines Matching refs:aiob
54 static void aio_block_init(aio_block* aiob, unsigned num_bufs) { in aio_block_init() argument
55 aiob->iocb.resize(num_bufs); in aio_block_init()
56 aiob->iocbs.resize(num_bufs); in aio_block_init()
57 aiob->events.resize(num_bufs); in aio_block_init()
58 aiob->num_submitted = 0; in aio_block_init()
60 aiob->iocbs[i] = &aiob->iocb[i]; in aio_block_init()
62 memset(&aiob->ctx, 0, sizeof(aiob->ctx)); in aio_block_init()
63 if (io_setup(num_bufs, &aiob->ctx)) { in aio_block_init()
130 aio_block* aiob = read ? &h->read_aiob : &h->write_aiob; in usb_ffs_do_aio() local
135 int packet_size = getMaxPacketSize(aiob->fd); in usb_ffs_do_aio()
144 io_prep(&aiob->iocb[i], aiob->fd, cur_data, buf_len, 0, read); in usb_ffs_do_aio()
156 io_prep(&aiob->iocb[num_bufs], aiob->fd, reinterpret_cast<const void*>(cur_data), in usb_ffs_do_aio()
162 if (TEMP_FAILURE_RETRY(io_submit(aiob->ctx, num_bufs, aiob->iocbs.data())) < num_bufs) { in usb_ffs_do_aio()
166 if (TEMP_FAILURE_RETRY(io_getevents(aiob->ctx, num_bufs, num_bufs, aiob->events.data(), in usb_ffs_do_aio()
171 if (num_bufs == 1 && aiob->events[0].res == -EINTR) { in usb_ffs_do_aio()
176 if (aiob->events[i].res < 0) { in usb_ffs_do_aio()
177 errno = -aiob->events[i].res; in usb_ffs_do_aio()
182 ret += aiob->events[i].res; in usb_ffs_do_aio()