From 836e857b3098f8962c621a33f7ae5b532cf512f3 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 2 Apr 2023 19:15:22 +0200 Subject: Sockets: Unified API for main and other loops Now sk_open() requires an explicit IO loop to open the socket in. Also specific functions for socket RX pause / resume are added to allow for BGP corking. And last but not least, socket reloop is now synchronous to resolve weird cases of the target loop stopping before actually picking up the relooped socket. Now the caller must ensure that both loops are locked while relooping, and this way all sockets always have their respective loop. --- sysdep/bsd/krt-sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdep/bsd/krt-sock.c') diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index e7b21474..094268b7 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -1088,7 +1088,7 @@ krt_sock_open(pool *pool, void *data, int table_id UNUSED) sk->fd = fd; sk->data = data; - if (sk_open(sk) < 0) + if (sk_open(sk, &main_birdloop) < 0) bug("krt-sock: sk_open failed"); return sk; -- cgit v1.2.3