summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--ev_epoll.c2
-rw-r--r--ev_vars.h5
-rw-r--r--ev_wrap.h6
4 files changed, 14 insertions, 2 deletions
diff --git a/Changes b/Changes
index 149c004..cfd1fbd 100644
--- a/Changes
+++ b/Changes
@@ -4,7 +4,10 @@ TODO: move some other examples to common idioms? combining watchers,
thread usage, coroutine switch?
TODO: /dev/null epoll breakage, maybe catch EPERM?
+TODO: frankenpoll
4.03
+ - support files, /dev/zero etc. the same way as select in the epoll
+ backend, by generating events on our own.
- define EV_READ/EV_WRITE as macros in event.h, as some programs use
#ifdef to test for them.
diff --git a/ev_epoll.c b/ev_epoll.c
index bf7bd64..fda636d 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -203,7 +203,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax);
}
- /* now add events for all fds where epoll fails, while select works... */
+ /* now synthesize events for all fds where epoll fails, while select works... */
for (i = epoll_epermcnt; i--; )
{
int fd = epoll_eperms [i];
diff --git a/ev_vars.h b/ev_vars.h
index 16d48ab..5de913d 100644
--- a/ev_vars.h
+++ b/ev_vars.h
@@ -1,7 +1,7 @@
/*
* loop member variable declarations
*
- * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
@@ -102,6 +102,9 @@ VARx(int, pollidxmax)
#if EV_USE_EPOLL || EV_GENWRAP
VARx(struct epoll_event *, epoll_events)
VARx(int, epoll_eventmax)
+VARx(int *, epoll_eperms)
+VARx(int, epoll_epermcnt)
+VARx(int, epoll_epermmax)
#endif
#if EV_USE_KQUEUE || EV_GENWRAP
diff --git a/ev_wrap.h b/ev_wrap.h
index 9c19fe6..1c1d37f 100644
--- a/ev_wrap.h
+++ b/ev_wrap.h
@@ -40,6 +40,9 @@
#define pollidxmax ((loop)->pollidxmax)
#define epoll_events ((loop)->epoll_events)
#define epoll_eventmax ((loop)->epoll_eventmax)
+#define epoll_eperms ((loop)->epoll_eperms)
+#define epoll_epermcnt ((loop)->epoll_epermcnt)
+#define epoll_epermmax ((loop)->epoll_epermmax)
#define kqueue_changes ((loop)->kqueue_changes)
#define kqueue_changemax ((loop)->kqueue_changemax)
#define kqueue_changecnt ((loop)->kqueue_changecnt)
@@ -132,6 +135,9 @@
#undef pollidxmax
#undef epoll_events
#undef epoll_eventmax
+#undef epoll_eperms
+#undef epoll_epermcnt
+#undef epoll_epermmax
#undef kqueue_changes
#undef kqueue_changemax
#undef kqueue_changecnt