summaryrefslogtreecommitdiff
path: root/src/include/liburing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r--src/include/liburing.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index cfce895..5de8aab 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -248,6 +248,11 @@ static inline unsigned io_uring_sq_space_left(struct io_uring *ring)
return *ring->sq.kring_entries - (ring->sq.sqe_tail - ring->sq.sqe_head);
}
+static inline unsigned io_uring_cq_ready(struct io_uring *ring)
+{
+ return io_uring_smp_load_acquire(ring->cq.ktail) - *ring->cq.khead;
+}
+
#ifdef __cplusplus
}
#endif