diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2015-07-30 13:18:58 +0200 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2015-07-30 13:26:40 +0200 |
commit | c5359783b2afe160978250905a0bf06e5668f460 (patch) | |
tree | 691b07ac340bd8e49aad99029286dd1fb1a2b71b | |
parent | e50eaaf192ecf01d37cd093cf5821dbc44cd7926 (diff) | |
download | man-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.2 | 23 |
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 () |