summaryrefslogtreecommitdiff
path: root/sysdep/unix/io-loop.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-10-04 16:15:36 +0200
committerMaria Matejka <mq@ucw.cz>2022-10-04 16:15:36 +0200
commitdc9351d326b9d2d8bcb7e9a0e5126878c2b02762 (patch)
tree842b9d21cc1f4b16869cac58711902f5b1f78b91 /sysdep/unix/io-loop.h
parent00679a688a5feff7a919cbeae71dd050ccc90b22 (diff)
parent67256d50359d42aca4e64bb1cb5dcb3c63669578 (diff)
Merge commit '67256d50' into HEAD
Diffstat (limited to 'sysdep/unix/io-loop.h')
-rw-r--r--sysdep/unix/io-loop.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sysdep/unix/io-loop.h b/sysdep/unix/io-loop.h
index 31c40459..29ca96d6 100644
--- a/sysdep/unix/io-loop.h
+++ b/sysdep/unix/io-loop.h
@@ -9,6 +9,16 @@
#include "lib/rcu.h"
+struct pipe
+{
+ int fd[2];
+};
+
+void pipe_new(struct pipe *);
+void pipe_pollin(struct pipe *, struct pollfd *);
+void pipe_drain(struct pipe *);
+void pipe_kick(struct pipe *);
+
struct birdloop
{
pool *pool;
@@ -25,7 +35,7 @@ struct birdloop
uint ping_pending;
_Atomic u32 ping_sent;
- int wakeup_fds[2];
+ struct pipe wakeup;
pthread_t thread_id;
pthread_attr_t thread_attr;
@@ -34,6 +44,9 @@ struct birdloop
uint links;
+ _Atomic u32 flags;
+ struct birdloop_flag_handler *flag_handler;
+
void (*stopped)(void *data);
void *stop_data;