From 796f0af0ccdaf9d4078ee254365007d12a669b4d Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 1 Nov 2023 18:23:43 +0100 Subject: [PATCH] Fixes to root pool and meta loop to allow resource dumps --- lib/resource.c | 1 + sysdep/unix/io-loop.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/resource.c b/lib/resource.c index 611db4d7..674e778d 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -336,6 +336,7 @@ resource_init(void) rcu_init(); resource_sys_init(); + root_pool.r.class = &pool_class; rp_init(&root_pool, the_bird_domain.the_bird, "Root"); tmp_init(&root_pool, the_bird_domain.the_bird); } diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index db5bbcb5..96699eb4 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -892,6 +892,7 @@ bird_thread_main(void *arg) bird_thread_busy_update(thr, timeout); account_to(&this_thread->idle); + birdloop_leave(thr->meta); poll_retry:; int rv = poll(pfd.pfd.data, pfd.pfd.used, timeout); if (rv < 0) @@ -902,6 +903,7 @@ poll_retry:; } account_to(&this_thread->overhead); + birdloop_enter(thr->meta); /* Drain wakeup fd */ if (pfd.pfd.data[0].revents & POLLIN)