]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes to root pool and meta loop to allow resource dumps
authorMaria Matejka <mq@ucw.cz>
Wed, 1 Nov 2023 17:23:43 +0000 (18:23 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 1 Nov 2023 17:23:43 +0000 (18:23 +0100)
lib/resource.c
sysdep/unix/io-loop.c

index 611db4d7e2bee760003ffe94507a840388ad14fb..674e778dffde9b892e2823cdc57c95b8a1aa139b 100644 (file)
@@ -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);
 }
index db5bbcb5cd0b7b25d5fa07ba0c0936db319f915a..96699eb4ee2a405da81b92fdbe56e023b10348f6 100644 (file)
@@ -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)