summaryrefslogtreecommitdiff
path: root/src/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/queue.c')
-rw-r--r--src/queue.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/queue.c b/src/queue.c
index 6b63490..f9b6c86 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -405,16 +405,7 @@ int io_uring_submit_and_wait(struct io_uring *ring, unsigned wait_nr)
struct io_uring_sqe *io_uring_get_sqe(struct io_uring *ring)
{
- struct io_uring_sq *sq = &ring->sq;
- unsigned int head = io_uring_smp_load_acquire(sq->khead);
- unsigned int next = sq->sqe_tail + 1;
- struct io_uring_sqe *sqe = NULL;
-
- if (next - head <= *sq->kring_entries) {
- sqe = &sq->sqes[sq->sqe_tail & *sq->kring_mask];
- sq->sqe_tail = next;
- }
- return sqe;
+ return _io_uring_get_sqe(ring);
}
int __io_uring_sqring_wait(struct io_uring *ring)