summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-09-21 14:59:30 -0600
committerJens Axboe <axboe@kernel.dk>2019-09-21 14:59:30 -0600
commit2d5ee6983ab55616bacb042370da8bb35492030c (patch)
tree50e550c16a0bb33899677bb6113d4d1c1dc99777 /src
parent8b93cca24b51e4a9be628c8bfde03399640e5ae6 (diff)
downloadliburing-2d5ee6983ab55616bacb042370da8bb35492030c.tar.gz
liburing-2d5ee6983ab55616bacb042370da8bb35492030c.tar.bz2
__io_uring_get_cqe: change 'wait' bool to be a count of requests
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r--src/queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/queue.c b/src/queue.c
index 8f0a1e4..97a99d7 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -13,7 +13,7 @@
static int __io_uring_get_cqe(struct io_uring *ring,
struct io_uring_cqe **cqe_ptr, unsigned submit,
- int wait)
+ unsigned wait_nr)
{
int ret, err = 0;
unsigned head;
@@ -32,9 +32,9 @@ static int __io_uring_get_cqe(struct io_uring *ring,
}
break;
}
- if (!wait)
+ if (!wait_nr)
return -EAGAIN;
- ret = io_uring_enter(ring->ring_fd, submit, 1,
+ ret = io_uring_enter(ring->ring_fd, submit, wait_nr,
IORING_ENTER_GETEVENTS, NULL);
if (ret < 0)
return -errno;