summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-03-02 09:41:14 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-03-02 09:41:14 +0100
commit8bcb5fb1e8a0718f88f99cde2f5b5a3bae5c4451 (patch)
treec4ce5adbef88e2b2b002d42e274773f424aa1f19 /lib
parent4e63974471c4e2f11781cda163e0dc2ac6fb72f9 (diff)
Implement latency tracking, internal event log and watchdog
Diffstat (limited to 'lib')
-rw-r--r--lib/event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/event.c b/lib/event.c
index b429c205..c33e0ffc 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -114,6 +114,8 @@ ev_schedule(event *e)
ev_enqueue(&global_event_list, e);
}
+void io_log_event(void *hook, void *data);
+
/**
* ev_run_list - run an event list
* @l: an event list
@@ -132,6 +134,11 @@ ev_run_list(event_list *l)
WALK_LIST_FIRST(n, tmp_list)
{
event *e = SKIP_BACK(event, n, n);
+
+ /* This is ugly hack, we want to log just events executed from the main I/O loop */
+ if (l == &global_event_list)
+ io_log_event(e->hook, e->data);
+
ev_run(e);
}
return !EMPTY_LIST(*l);