+struct libaio_options {
+ void *pad;
+ unsigned int userspace_reap;
+ unsigned int hipri;
+};
+
+static struct fio_option options[] = {
+ {
+ .name = "userspace_reap",
+ .lname = "Libaio userspace reaping",
+ .type = FIO_OPT_STR_SET,
+ .off1 = offsetof(struct libaio_options, userspace_reap),
+ .help = "Use alternative user-space reap implementation",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_LIBAIO,
+ },
+ {
+ .name = "hipri",
+ .lname = "High Priority",
+ .type = FIO_OPT_STR_SET,
+ .off1 = offsetof(struct libaio_options, hipri),
+ .help = "Use polled IO completions",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_LIBAIO,
+ },
+ {
+ .name = NULL,
+ },
+};
+
+static inline void ring_inc(struct libaio_data *ld, unsigned int *val,
+ unsigned int add)
+{
+ if (ld->is_pow2)
+ *val = (*val + add) & (ld->entries - 1);
+ else
+ *val = (*val + add) % ld->entries;
+}
+