X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fevent.h;h=cf3c70a163b531b331bef39a9b797d8cff53d875;hb=de40dd736a1b048e5e0f856184f832fa4db184d3;hp=02d1958352fe291ef5698aec0ac66ace0813fafe;hpb=7bbb509d0d0e00b998c0b253574c39da9e0ff56b;p=meshlink diff --git a/src/event.h b/src/event.h index 02d19583..cf3c70a1 100644 --- a/src/event.h +++ b/src/event.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_EVENT_H +#define MESHLINK_EVENT_H + /* event.h -- I/O, timeout and signal event handling - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +20,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __MESHLINK_EVENT_H__ -#define __MESHLINK_EVENT_H__ - #include "splay_tree.h" #include "system.h" #include @@ -32,7 +32,7 @@ typedef struct event_loop_t event_loop_t; typedef void (*io_cb_t)(event_loop_t *loop, void *data, int flags); typedef void (*timeout_cb_t)(event_loop_t *loop, void *data); typedef void (*signal_cb_t)(event_loop_t *loop, void *data); -typedef struct timeval (*idle_cb_t)(event_loop_t *loop, void *data); +typedef struct timeval(*idle_cb_t)(event_loop_t *loop, void *data); typedef struct io_t { int fd; @@ -63,7 +63,7 @@ struct event_loop_t { volatile bool running; struct timeval now; bool deletion; - + splay_tree_t ios; splay_tree_t timeouts; splay_tree_t signals;