summaryrefslogtreecommitdiffstats
path: root/include/linux/capability.h
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2012-05-01 21:33:34 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-05 21:50:41 +0200
commit4d7e30d98939a0340022ccd49325a3d70f7e0238 (patch)
tree45307bd3a0b7fafc71aea41fc518f42e2e810e76 /include/linux/capability.h
parentb86ff9820fd5df69295273b9aa68e58786ffc23f (diff)
downloadlinux-4d7e30d98939a0340022ccd49325a3d70f7e0238.tar.gz
linux-4d7e30d98939a0340022ccd49325a3d70f7e0238.tar.bz2
linux-4d7e30d98939a0340022ccd49325a3d70f7e0238.zip
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>
Diffstat (limited to 'include/linux/capability.h')
-rw-r--r--include/linux/capability.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 12d52dedb229..c398cff3dab7 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -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)