summaryrefslogtreecommitdiff
path: root/src/include/liburing.h
diff options
context:
space:
mode:
authorJulia Suvorova <jusual@redhat.com>2019-08-19 08:45:28 -0600
committerJens Axboe <axboe@kernel.dk>2019-08-19 08:45:28 -0600
commit552c6a08d04c74d20eeaa86f535bfd553b352370 (patch)
tree2929f38ee29c4757ff78e815792c646736e3b378 /src/include/liburing.h
parent0520db454c29f1d96cda6cf6cedeb93df65301e8 (diff)
downloadliburing-552c6a08d04c74d20eeaa86f535bfd553b352370.tar.gz
liburing-552c6a08d04c74d20eeaa86f535bfd553b352370.tar.bz2
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 <stefanha@redhat.com> Signed-off-by: Julia Suvorova <jusual@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r--src/include/liburing.h9
1 files changed, 6 insertions, 3 deletions
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);
}
}