summaryrefslogtreecommitdiff
path: root/proto/bfd/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/bfd/io.h')
-rw-r--r--proto/bfd/io.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/proto/bfd/io.h b/proto/bfd/io.h
index 4f7c678d..3f166a47 100644
--- a/proto/bfd/io.h
+++ b/proto/bfd/io.h
@@ -63,6 +63,13 @@ tm2_new_init(pool *p, void (*hook)(struct timer2 *), void *data, uint rec, uint
return t;
}
+static inline void
+tm2_set_max(timer2 *t, btime when)
+{
+ if (when > t->expires)
+ tm2_set(t, when);
+}
+
/*
static inline void
tm2_start_max(timer2 *t, btime after)
@@ -78,9 +85,11 @@ void sk_stop(sock *s);
-struct birdloop *birdloop_new(pool *p);
+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);