Lines Matching refs:iocb
58 struct aiocb **iocb, *kq_iocb; in main() local
79 iocb = calloc(max_queue_per_proc, sizeof(struct aiocb*)); in main()
80 if (iocb == NULL) in main()
106 iocb[i] = (struct aiocb *)calloc(1, in main()
108 if (iocb[i] == NULL) in main()
115 iocb[i]->aio_nbytes = sizeof(buffer); in main()
116 iocb[i]->aio_buf = buffer; in main()
117 iocb[i]->aio_fildes = fd; in main()
118 iocb[i]->aio_offset = iocb[i]->aio_nbytes * i * run; in main()
120 iocb[i]->aio_sigevent.sigev_notify_kqueue = kq; in main()
121 iocb[i]->aio_sigevent.sigev_value.sival_ptr = iocb[i]; in main()
122 iocb[i]->aio_sigevent.sigev_notify = SIGEV_KEVENT; in main()
124 result = aio_write(iocb[i]); in main()
131 printf("WRITE %d is at %p\n", i, iocb[i]); in main()
136 result = aio_cancel(fd, iocb[i]); in main()
138 printf("Cancel %d %p result %d\n", i, iocb[i], result); in main()
141 aio_return(iocb[i]); in main()
142 iocb[i] = NULL; in main()
193 for (j = 0; j < max_queue_per_proc && iocb[j] != kq_iocb; in main()
215 iocb[j] = NULL; in main()
221 free(iocb[i]); in main()