diff options
author | NeilBrown <neilb@suse.de> | 2014-07-07 07:32:49 +0200 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-07-07 09:07:12 +0200 |
commit | 6db5acce0e18dedcf0b3ff57415eaea45ec92636 (patch) | |
tree | c809a33e6bcbb7e46803e6273c30a5f2658e34c5 | |
parent | 1bc86e8a0d843d09f9423cf951e46ecf2a804e36 (diff) |
epoll.7: Document EPOLLWAKEUP
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man7/epoll.7 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/man7/epoll.7 b/man7/epoll.7 index a372d9727..31b1a8c8c 100644 --- a/man7/epoll.7 +++ b/man7/epoll.7 @@ -173,6 +173,35 @@ it is the caller's responsibility to rearm the file descriptor using .BR epoll_ctl (2) with .BR EPOLL_CTL_MOD . +.SS Interaction with autosleep +If the system is in +.B autosleep +mode via +.I /sys/power/autosleep +and an event happens which wakes the device from sleep, the device +driver will only keep the device awake until that event is queued. To +keep the device awake until the event has been processed it is +necessary to use +.B epoll +and the +.B EPOLLWAKEUP +flag. + +When this flag is set in the +.B events +field for a +.I struct epoll_event +then system will be kept awake from the moment the event is queued, +through the +.IR epoll_wait (2) +call which returns the event until the subsequent +.IR epoll_wait (2) +call. If the event should keep the system awake beyond that time, +the a separate +.I wake_lock +should be taken before the second +.IR epoll_wait (2) +call. .SS /proc interfaces The following interfaces can be used to limit the amount of kernel memory consumed by epoll: |