]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
io_getevents.2: Clarify and extend discussion of 'timeout' argument
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 30 Jul 2015 11:18:58 +0000 (13:18 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 30 Jul 2015 11:26:40 +0000 (13:26 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/io_getevents.2

index ac0483bf081c4b35b792a79851f41c7d20e482ff..e8e945a65345899273ed4252004eb50c5497325e 100644 (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 ()