Function nc::call::io_getevents
source · pub unsafe fn io_getevents(
ctx_id: aio_context_t,
min_nr: isize,
nr: isize,
events: &mut io_event_t,
timeout: &mut timespec_t
) -> Result<i32, Errno>
Expand description
Attempts to read at least min_nr
events and up to nr events from
the completion queue for the aio_context
specified by ctx_id
.
If it succeeds, the number of read events is returned.
§Errors
- May fail with
-EINVAL
ifctx_id
is invalid, ifmin_nr
is out of range, ifnr
is out of range, iftimeout
is out of range. - May fail with
-EFAULT
if any of the memory specified is invalid. - May return 0 or <
min_nr
if the timeout specified by timeout has elapsed before sufficient events are available, where timeout == NULL specifies an infinite timeout. Note that the timeout pointed to by timeout is relative. - Will fail with
-ENOSYS
if not implemented.