summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 7c6731f..1cae1cd 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -241,6 +241,11 @@ static inline void io_uring_prep_timeout(struct io_uring_sqe *sqe,
io_uring_prep_rw(IORING_OP_TIMEOUT, sqe, 0, ts, 1, count);
}
+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);
+}
+
#ifdef __cplusplus
}
#endif