From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH] epoll: add EPOLLWAKEUP constant
Date: Thu, 17 Jan 2013 21:45:45 +0000 [thread overview]
Message-ID: <20130117214545.GA8699@dcvr.yhbt.net> (raw)
In-Reply-To: <20130117214545.GA8699@dcvr.yhbt.net>
This was added in Linux 3.5 and glibc 2.17
---
commit 9449295d3e6109fb5516a1aa2e6735e2a043a7ab in
git://bogomips.org/sleepy_penguin.git master
ext/sleepy_penguin/epoll.c | 9 +++++++++
1 file changed, 9 insertions(+)
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));
--
Eric Wong
parent reply other threads:[~2013-01-17 21:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20130117214545.GA8699@dcvr.yhbt.net>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/sleepy_penguin/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130117214545.GA8699@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=sleepy.penguin@librelist.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/sleepy_penguin.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).