summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorroot <root>2007-11-08 21:14:15 +0000
committerroot <root>2007-11-08 21:14:15 +0000
commit691ff6d0d32c60f66a03079376110c1371614ef2 (patch)
tree317d8abf7ac4f4e902b976e85bb96145f555f52a /event.c
parent48151275f9dd2099bb2e98f47a341678182d9230 (diff)
implement event_activate, might opt to replace it by a stright call to the callback?
Diffstat (limited to 'event.c')
-rw-r--r--event.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/event.c b/event.c
index 520e336..b374e68 100644
--- a/event.c
+++ b/event.c
@@ -248,6 +248,18 @@ int event_del (struct event *ev)
return 0;
}
+void event_active (struct event *ev, int res, short ncalls)
+{
+ if (res & EV_TIMEOUT)
+ ev_feed_event (&iosig.to, res & EV_TIMEOUT);
+
+ if (res & EV_SIGNAL)
+ ev_feed_event (&iosig.sig, res & EV_SIGNAL);
+
+ if (res & (EV_READ | EV_WRITE))
+ ev_feed_event (&iosig.io, res & (EV_READ | EV_WRITE));
+}
+
int event_pending (struct event *ev, short events, struct timeval *tv)
{
short revents = 0;