X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fio_uring.c;h=15a4d4753639ce3bf6ef73b1d752a491fc520129;hp=ebca08c874d446c11ab36c3dc8a94831742269e3;hb=e2239016d4839aeb54b5da61f94baf0d518233fb;hpb=6e70fd303855575c99c520e8c46b7d85c9f21dc8 diff --git a/engines/io_uring.c b/engines/io_uring.c index ebca08c8..15a4d475 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -20,28 +20,22 @@ #ifdef ARCH_HAVE_IOURING -typedef uint64_t u64; -typedef uint32_t u32; -typedef int32_t s32; -typedef uint16_t u16; -typedef uint8_t u8; - #include "../os/io_uring.h" struct io_sq_ring { - u32 *head; - u32 *tail; - u32 *ring_mask; - u32 *ring_entries; - u32 *flags; - u32 *array; + unsigned *head; + unsigned *tail; + unsigned *ring_mask; + unsigned *ring_entries; + unsigned *flags; + unsigned *array; }; struct io_cq_ring { - u32 *head; - u32 *tail; - u32 *ring_mask; - u32 *ring_entries; + unsigned *head; + unsigned *tail; + unsigned *ring_mask; + unsigned *ring_entries; struct io_uring_event *events; }; @@ -211,7 +205,7 @@ static int fio_ioring_cqring_reap(struct thread_data *td, unsigned int events, { struct ioring_data *ld = td->io_ops_data; struct io_cq_ring *ring = &ld->cq_ring; - u32 head, reaped = 0; + unsigned head, reaped = 0; head = *ring->head; do { @@ -401,7 +395,7 @@ static int fio_ioring_mmap(struct ioring_data *ld, struct io_uring_params *p) struct io_cq_ring *cring = &ld->cq_ring; void *ptr; - ld->mmap[0].len = p->sq_off.array + p->sq_entries * sizeof(u32); + ld->mmap[0].len = p->sq_off.array + p->sq_entries * sizeof(__u32); ptr = mmap(0, ld->mmap[0].len, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE, ld->ring_fd, IORING_OFF_SQ_RING);