summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2007-11-02 20:59:14 +0000
committerroot <root>2007-11-02 20:59:14 +0000
commit8ee8df9cf84f6ae595eb82ebe7e5eb119112087e (patch)
tree431a38686ef5cc5b72001302d1aba13aadc1b268 /ev.c
parent338036c31a5f2290ed99ef7e27f1bc450f8487bd (diff)
added kqeueue backend, completely untested
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index a9864a7..cca3a3d 100644
--- a/ev.c
+++ b/ev.c
@@ -66,6 +66,10 @@
# define EV_USE_EPOLL 0
#endif
+#ifndef EV_USE_KQUEUE
+# define EV_USE_KQUEUE 0
+#endif
+
#ifndef EV_USE_REALTIME
# define EV_USE_REALTIME 1
#endif
@@ -484,6 +488,9 @@ childcb (struct ev_signal *sw, int revents)
/*****************************************************************************/
+#if EV_USE_KQUEUE
+# include "ev_kqueue.c"
+#endif
#if EV_USE_EPOLL
# include "ev_epoll.c"
#endif
@@ -541,6 +548,9 @@ int ev_init (int methods)
methods = EVMETHOD_ANY;
ev_method = 0;
+#if EV_USE_KQUEUE
+ if (!ev_method && (methods & EVMETHOD_KQUEUE)) kqueue_init (methods);
+#endif
#if EV_USE_EPOLL
if (!ev_method && (methods & EVMETHOD_EPOLL )) epoll_init (methods);
#endif