From: Maria Matejka Date: Fri, 7 Jun 2024 11:19:51 +0000 (+0200) Subject: Threads shouldn't drop stopping loops X-Git-Tag: v3.0.0~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf961ba405dec017ed931f386a2261902a4419a3;p=thirdparty%2Fbird.git Threads shouldn't drop stopping loops --- diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index 3c64ab4f7..01cf74006 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -666,7 +666,6 @@ birdloop_take(struct birdloop_pickup_group *group) struct birdloop *loop = NULL; LOCK_DOMAIN(attrs, group->domain); - int drop = this_thread->busy_active && (group->thread_busy_count < group->thread_count) && @@ -683,7 +682,7 @@ birdloop_take(struct birdloop_pickup_group *group) WALK_LIST2(loop, n, this_thread->loops, n) { birdloop_enter(loop); - if (ev_active(&loop->event)) + if (ev_active(&loop->event) && !loop->stopped) { LOOP_TRACE(loop, DL_SCHEDULING, "Dropping from thread"); /* Pass to another thread */