diff options
| author | Mike Crowe <mac@mcrowe.com> | 2016-09-15 10:17:53 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-09-20 13:24:50 +0200 |
| commit | c1a2cf47ee7f18f08c8f8cd353eef60531f3753b (patch) | |
| tree | e3572e6ec700a658932931cfe03efd5c219f0deb /man2 | |
| parent | 8d8251526043abbd7a9871e7168db55f5cb11d7c (diff) | |
| download | man-pages-c1a2cf47ee7f18f08c8f8cd353eef60531f3753b.tar.gz | |
epoll_wait.2: Clarify that the timeout is measured against CLOCK_MONOTONIC
The existing page left the choice of clock as ambiguous. My
reading of the kernel implementation is that CLOCK_MONOTONIC is
always used since ep_poll() calls schedule_hrtimeout_range(),
which calls schedule_hrtimeout_range_clock() passing
CLOCK_MONOTONIC.
References:
http://lxr.free-electrons.com/source/fs/eventpoll.c?v=4.7#L1614
http://lxr.free-electrons.com/source/kernel/time/hrtimer.c?v=4.7#L1785
The "measured against" terminology was borrowed from nanosleep.2.
I've checked all the way back to Linux v2.6.12 where the
calculation was done using jiffies so I think that this has
effectively always been true.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Diffstat (limited to 'man2')
| -rw-r--r-- | man2/epoll_wait.2 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2 index 963790644d..48bb281345 100644 --- a/man2/epoll_wait.2 +++ b/man2/epoll_wait.2 @@ -55,6 +55,9 @@ The argument specifies the number of milliseconds that .BR epoll_wait () will block. +Time is measured against the +.B CLOCK_MONOTONIC +clock. The call will block until either: .IP * 3 a file descriptor delivers an event; |
