Rename the io_uring_* system calls to __sys_io_uring_* and make them
locals.
We only have the system calls because they are not in glibc yet, and
it's somewhat confusing that they share the same namespace as the
library functions. With this change, any exported io_uring_* function
is a library function.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Small fix to make sure correct ts structure is filled with correct values.
Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Add multi timeout reqs test case which want to test submitting timeout
reqs with different count number, check the return sequence and the
status of each req.
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Add multi timeout reqs test case which want to test submitting timeout
reqs with different timeout value, check the return sequence and the
status of each req.
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
We made a kernel change to support timeouts properly on 32-bit
archs, update liburing to use __kernel_timespec instead of the
differently sized timespec.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
We also need the sigset for certain setups, and adding a third
option is pretty crazy. Since io_uring_wait_cqes_timeout() isn't
in a released version yet (and neither is io_uring_wait_cqes()),
make the necessary adjustments.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
We call this internally after queueing the timeout SQE anyway, so
the application doesn't have to do it upfront.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Like io_uring_wait_cqe(), except it accepts a timeout value as well. Note
that an sqe is used internally to handle the timeout. Applications using
this function must never set sqe->user_data to LIBURING_UDATA_TIMEOUT!
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Add support for the current TIMEOUT variant. This allows passing
in a timeout and event count, first of which will trigger the
completion of the timeout command.
If the timeout is hit, the command completes with cqe->res == -ETIME.
If the asked number of events complete first, the command completes
with cqe->res == 0.
test/timeout.c tests a variety of timeout conditions.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
We need a wakeup even if we don't hit the desired number of
available commands if a timeout has triggered. Add a test case
for that.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
In my testing, we're always right on 1000 msec, but allow some slack
and just judge it good if we're within +- 50%.
Signed-off-by: Jens Axboe <axboe@kernel.dk>