From: Michalis Pappas Date: Tue, 10 Dec 2024 09:10:00 +0000 (+0100) Subject: lib/ukschecoop: Remove invalid assertion X-Git-Tag: RELEASE-0.18.0~33 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d7b620899c175013c942cf2335b506a43e1b3c6b;p=unikraft%2Funikraft.git lib/ukschecoop: Remove invalid assertion Remove an assertion for prev->s in schedcoop_schedule(), as it is a valid case that uk_sched_yield() is called to switch away from a terminated thread. Signed-off-by: Michalis Pappas Approved-by: Simon Kuenzer Reviewed-by: Simon Kuenzer GitHub-Closes: #1550 --- diff --git a/lib/ukschedcoop/schedcoop.c b/lib/ukschedcoop/schedcoop.c index b5a045689..3e150c4c0 100644 --- a/lib/ukschedcoop/schedcoop.c +++ b/lib/ukschedcoop/schedcoop.c @@ -126,10 +126,8 @@ static void schedcoop_schedule(struct uk_sched *s) * interrupted at the return instruction. And therefore at safe point. */ if (prev != next) { - if (next != &c->idle) { - UK_ASSERT(prev->sched); + if (next != &c->idle) uk_sched_stats_next_count_incr(s); - } uk_sched_thread_switch(next); } }