diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-01-17 21:40:26 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-01-17 21:40:26 +0000 |
commit | 9449295d3e6109fb5516a1aa2e6735e2a043a7ab (patch) | |
tree | 2223e81ce97cc14b0728f8913fb6e8dc9227ae82 /ext/sleepy_penguin/epoll.c | |
parent | b3fa14976bc41c2daad0b8a6afd74a8212dcb97b (diff) | |
download | sleepy_penguin-9449295d3e6109fb5516a1aa2e6735e2a043a7ab.tar.gz |
This was added in Linux 3.5 and glibc 2.17
Diffstat (limited to 'ext/sleepy_penguin/epoll.c')
-rw-r--r-- | ext/sleepy_penguin/epoll.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/sleepy_penguin/epoll.c b/ext/sleepy_penguin/epoll.c index a507b0c..2b7f5c1 100644 --- a/ext/sleepy_penguin/epoll.c +++ b/ext/sleepy_penguin/epoll.c @@ -764,6 +764,15 @@ void sleepy_penguin_init_epoll(void) rb_define_const(cEpoll, "RDHUP", UINT2NUM(EPOLLRDHUP)); #endif +#ifdef EPOLLWAKEUP + /* + * This prevents system suspend while event is ready. + * This requires the caller to have the CAP_BLOCK_SUSPEND capability + * Available since Linux 3.5 + */ + rb_define_const(cEpoll, "WAKEUP", UINT2NUM(EPOLLWAKEUP)); +#endif + /* watch for urgent read(2) data */ rb_define_const(cEpoll, "PRI", UINT2NUM(EPOLLPRI)); |