mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 13:21:45 +00:00
epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
When an epoll_event, that has the EPOLLWAKEUP flag set, is ready, a wakeup_source will be active to prevent suspend. This can be used to handle wakeup events from a driver that support poll, e.g. input, if that driver wakes up the waitqueue passed to epoll before allowing suspend. Signed-off-by: Arve Hjønnevåg <arve@android.com> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
parent
b86ff9820f
commit
4d7e30d989
3 changed files with 103 additions and 4 deletions
|
@ -360,8 +360,11 @@ struct cpu_vfs_cap_data {
|
|||
|
||||
#define CAP_WAKE_ALARM 35
|
||||
|
||||
/* Allow preventing system suspends while epoll events are pending */
|
||||
|
||||
#define CAP_LAST_CAP CAP_WAKE_ALARM
|
||||
#define CAP_EPOLLWAKEUP 36
|
||||
|
||||
#define CAP_LAST_CAP CAP_EPOLLWAKEUP
|
||||
|
||||
#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue