struct timespec *t)
{
struct libaio_data *ld = td->io_data;
- int r;
+ long r;
do {
r = io_getevents(ld->aio_ctx, min, max, ld->aio_events, t);
break;
} while (1);
- return r;
+ return (int) r;
}
static int fio_libaio_queue(struct thread_data *td, struct io_u *io_u)
{
struct libaio_data *ld = td->io_data;
struct iocb *iocb = &io_u->iocb;
- int ret;
+ long ret;
do {
ret = io_submit(ld->aio_ctx, 1, &iocb);
break;
} while (1);
- return ret;
+ return (int) ret;
}
}
#endif /* FIO_HAVE_SPLICE */
+
+int fio_cpuio_init(struct thread_data *td)
+{
+ if (!td->cpuload) {
+ td_vmsg(td, EINVAL, "cpu thread needs rate");
+ return 1;
+ } else if (td->cpuload > 100)
+ td->cpuload = 100;
+
+ td->read_iolog = td->write_iolog = 0;
+ td->fd = -1;
+
+ return 0;
+}