From: Bart Van Assche Date: Sun, 21 Jun 2020 21:16:59 +0000 (-0700) Subject: engines/libaio: Use atomic_store_release() instead of read_barrier() X-Git-Tag: fio-3.21~28^2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d473a06da1630905e65868630c67d5043a9e76f2;p=fio.git engines/libaio: Use atomic_store_release() instead of read_barrier() This is a micro-optimization that does not affect the functionality of the code. Signed-off-by: Bart Van Assche --- diff --git a/engines/libaio.c b/engines/libaio.c index daa576da..398fdf91 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -195,8 +195,8 @@ static int user_io_getevents(io_context_t aio_ctx, unsigned int max, } else { /* There is another completion to reap */ events[i] = ring->events[head]; - read_barrier(); - ring->head = (head + 1) % ring->nr; + atomic_store_release(&ring->head, + (head + 1) % ring->nr); i++; } }