summaryrefslogtreecommitdiff
path: root/sysdep/unix/io-loop.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-06-18 18:23:41 +0200
committerMaria Matejka <mq@ucw.cz>2021-11-22 19:05:43 +0100
commitc84ed603714db2c42a781f8dbb5b3fd540ff689f (patch)
tree59b5c772dd1a9209ded29efc3ec58ba21582a810 /sysdep/unix/io-loop.h
parenta4451535c69b8f934523905a8131ae2f16be2146 (diff)
Moved BFD IO loop out of BFD as we want to use it as socket-io coroutine
Diffstat (limited to 'sysdep/unix/io-loop.h')
-rw-r--r--sysdep/unix/io-loop.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/sysdep/unix/io-loop.h b/sysdep/unix/io-loop.h
new file mode 100644
index 00000000..d858b04e
--- /dev/null
+++ b/sysdep/unix/io-loop.h
@@ -0,0 +1,34 @@
+/*
+ * BIRD -- I/O and event loop
+ *
+ * Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#ifndef _BIRD_IO_LOOP_H_
+#define _BIRD_IO_LOOP_H_
+
+#include "nest/bird.h"
+#include "lib/lists.h"
+#include "lib/resource.h"
+#include "lib/event.h"
+#include "lib/timer.h"
+#include "lib/socket.h"
+
+
+void ev2_schedule(event *e);
+
+void sk_start(sock *s);
+void sk_stop(sock *s);
+
+struct birdloop *birdloop_new(void);
+void birdloop_start(struct birdloop *loop);
+void birdloop_stop(struct birdloop *loop);
+void birdloop_free(struct birdloop *loop);
+
+void birdloop_enter(struct birdloop *loop);
+void birdloop_leave(struct birdloop *loop);
+void birdloop_mask_wakeups(struct birdloop *loop);
+void birdloop_unmask_wakeups(struct birdloop *loop);
+
+
+#endif /* _BIRD_IO_LOOP_H_ */