diff options
author | Maria Matejka <mq@ucw.cz> | 2022-09-12 10:24:55 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-09-18 16:33:51 +0200 |
commit | eac634575959a3d32007ebed9921897976c9a82d (patch) | |
tree | a263dd20f62c90b456fb4836705903f516e406fa /lib/io-loop.h | |
parent | 66f27005ec1a3e1fa78733aad56dcd976fbb2744 (diff) |
Loop flags: a simple idempotent event announcement mechanism
Diffstat (limited to 'lib/io-loop.h')
-rw-r--r-- | lib/io-loop.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/io-loop.h b/lib/io-loop.h index 2450a609..ae58bbee 100644 --- a/lib/io-loop.h +++ b/lib/io-loop.h @@ -50,6 +50,14 @@ 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. */ |