io_getevents.2: Clarify and extend discussion of 'timeout' argument

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-07-30 13:18:58 +02:00
parent e50eaaf192
commit c5359783b2
1 changed files with 20 additions and 3 deletions

View File

@ -27,10 +27,27 @@ system call
attempts to read at least \fImin_nr\fP events and
up to \fInr\fP events from the completion queue of the AIO context
specified by \fIctx_id\fP.
The \fItimeout\fP argument specifies the amount of time to wait for events,
where a NULL timeout waits until at least \fImin_nr\fP events
have been seen.
Note that \fItimeout\fP is relative.
and is specified as a relative timeout in a structure of the following form:
.in +4n
.nf
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds [0 .. 999999999] */
};
.fi
.in
The specified time will be rounded up to the system clock granularity
and is guaranteed not to expire early.
Specifying
.I timeout
as NULL means block indefinitely until at least
.I min_nr
events have been obtained.
.SH RETURN VALUE
On success,
.BR io_getevents ()