summaryrefslogtreecommitdiff
path: root/lib/io-loop.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/io-loop.h')
-rw-r--r--lib/io-loop.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/io-loop.h b/lib/io-loop.h
index 25f1b2a3..ae58bbee 100644
--- a/lib/io-loop.h
+++ b/lib/io-loop.h
@@ -14,12 +14,12 @@
#include "lib/event.h"
#include "lib/socket.h"
+extern struct birdloop main_birdloop;
+
void sk_start(sock *s);
void sk_stop(sock *s);
void sk_reloop(sock *s, struct birdloop *loop);
-extern struct birdloop main_birdloop;
-
/* Start a new birdloop owned by given pool and domain */
struct birdloop *birdloop_new(pool *p, uint order, const char *name);
@@ -50,5 +50,17 @@ void birdloop_unlink(struct birdloop *loop);
void birdloop_ping(struct birdloop *loop);
+struct birdloop_flag_handler {
+ void (*hook)(struct birdloop_flag_handler *, u32 flags);
+ void *data;
+};
+
+void birdloop_flag(struct birdloop *loop, u32 flag);
+void birdloop_flag_set_handler(struct birdloop *, struct birdloop_flag_handler *);
+
void birdloop_init(void);
+
+/* Yield for a little while. Use only in special cases. */
+void birdloop_yield(void);
+
#endif /* _BIRD_IO_LOOP_H_ */