aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2015-07-30 13:18:58 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2015-07-30 13:26:40 +0200
commitc5359783b2afe160978250905a0bf06e5668f460 (patch)
tree691b07ac340bd8e49aad99029286dd1fb1a2b71b
parente50eaaf192ecf01d37cd093cf5821dbc44cd7926 (diff)
downloadman-pages-c5359783b2afe160978250905a0bf06e5668f460.tar.gz
io_getevents.2: Clarify and extend discussion of 'timeout' argument
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/io_getevents.223
1 files changed, 20 insertions, 3 deletions
diff --git a/man2/io_getevents.2 b/man2/io_getevents.2
index ac0483bf08..e8e945a653 100644
--- a/man2/io_getevents.2
+++ b/man2/io_getevents.2
@@ -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 ()