summaryrefslogtreecommitdiff
path: root/sysdep/unix/io-loop.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/io-loop.h')
-rw-r--r--sysdep/unix/io-loop.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/sysdep/unix/io-loop.h b/sysdep/unix/io-loop.h
index d858b04e..4024b6c5 100644
--- a/sysdep/unix/io-loop.h
+++ b/sysdep/unix/io-loop.h
@@ -4,31 +4,32 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-#ifndef _BIRD_IO_LOOP_H_
-#define _BIRD_IO_LOOP_H_
+#ifndef _BIRD_SYSDEP_UNIX_IO_LOOP_H_
+#define _BIRD_SYSDEP_UNIX_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"
+struct birdloop
+{
+ pool *pool;
+ struct timeloop time;
+ event_list event_list;
+ list sock_list;
+ uint sock_num;
-void ev2_schedule(event *e);
+ BUFFER(sock *) poll_sk;
+ BUFFER(struct pollfd) poll_fd;
+ u8 poll_changed;
+ u8 close_scheduled;
-void sk_start(sock *s);
-void sk_stop(sock *s);
+ _Atomic u32 ping_sent;
+ int wakeup_fds[2];
-struct birdloop *birdloop_new(void);
-void birdloop_start(struct birdloop *loop);
-void birdloop_stop(struct birdloop *loop);
-void birdloop_free(struct birdloop *loop);
+ uint links;
-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);
+ void (*stopped)(void *data);
+ void *stop_data;
+ struct birdloop *prev_loop;
+};
-#endif /* _BIRD_IO_LOOP_H_ */
+#endif