From 552c6a08d04c74d20eeaa86f535bfd553b352370 Mon Sep 17 00:00:00 2001 From: Julia Suvorova Date: Mon, 19 Aug 2019 08:45:28 -0600 Subject: liburing/barrier.h: Add prefix io_uring to barriers The names of the barriers conflict with the namespaces of other projects when trying to directly include liburing.h. Avoid using popular global names. Reviewed-by: Stefan Hajnoczi Signed-off-by: Julia Suvorova Signed-off-by: Jens Axboe --- src/include/liburing.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/include/liburing.h') diff --git a/src/include/liburing.h b/src/include/liburing.h index fb78cd3..7d7c9df 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -88,9 +88,12 @@ extern int io_uring_register_eventfd(struct io_uring *ring, int fd); extern int io_uring_unregister_eventfd(struct io_uring *ring); #define io_uring_for_each_cqe(ring, head, cqe) \ - /* smp_load_acquire() enforces the order of tail and CQE reads. */ \ + /* \ + * io_uring_smp_load_acquire() enforces the order of tail \ + * and CQE reads. \ + */ \ for (head = *(ring)->cq.khead; \ - (cqe = (head != smp_load_acquire((ring)->cq.ktail) ? \ + (cqe = (head != io_uring_smp_load_acquire((ring)->cq.ktail) ? \ &(ring)->cq.cqes[head & (*(ring)->cq.kring_mask)] : NULL)); \ head++) \ @@ -108,7 +111,7 @@ static inline void io_uring_cq_advance(struct io_uring *ring, * Ensure that the kernel only sees the new value of the head * index after the CQEs have been read. */ - smp_store_release(cq->khead, *cq->khead + nr); + io_uring_smp_store_release(cq->khead, *cq->khead + nr); } } -- cgit