logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

io_uring_wait_cqe_timeout - wait for one io_uring completion event with timeout

Description

       The  io_uring_wait_cqe_timeout(3)  function  waits  for  one IO completion to be available from the queue
       belonging to the ring param, waiting for it if necessary or until the timeout ts expires. If an event  is
       already available in the ring when invoked, no waiting will occur.

       The cqe_ptr param is filled in on success.

       If ts is specified and an older kernel without IORING_FEAT_EXT_ARG is used, the application does not need
       to  call  io_uring_submit(3)  before  calling io_uring_wait_cqes(3).  For newer kernels with that feature
       flag set, there is no implied submit when waiting for a request.

       If ts is NULL, then this behaves like io_uring_wait_cqe(3) in that it will wait forever for an event.

Name

       io_uring_wait_cqe_timeout - wait for one io_uring completion event with timeout

Return Value

       On success io_uring_wait_cqe_timeout(3) returns 0 and the cqe_ptr param  is  filled  in.  On  failure  it
       returns  -errno.   The  return value indicates the result of waiting for a CQE, and it has no relation to
       the CQE result itself.

See Also

io_uring_submit(3), io_uring_wait_cqes(3), io_uring_wait_cqe(3)

liburing-2.1                                    November 15, 2021                   io_uring_wait_cqe_timeout(3)

Synopsis

#include<liburing.h>intio_uring_wait_cqe_timeout(structio_uring*ring,structio_uring_cqe**cqe_ptr,struct__kernel_timespec*ts);

See Also