From 134ecf380bcbc6a17a3155f1c543c5c7efaaf697 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Wed, 23 Oct 2024 16:13:22 +0300 Subject: [PATCH] task_exit.c: Add missing sched_note_stop() A regression from #13728 ; sched_note_stop() is never called for tasks that exit normally via exit(). --- sched/task/task_exit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sched/task/task_exit.c b/sched/task/task_exit.c index b4bb1b8401..9a021849eb 100644 --- a/sched/task/task_exit.c +++ b/sched/task/task_exit.c @@ -29,6 +29,8 @@ #include #include +#include + #include "sched/sched.h" #ifdef CONFIG_SMP @@ -141,6 +143,7 @@ int nxtask_exit(void) #endif dtcb->task_state = TSTATE_TASK_INACTIVE; + sched_note_stop(dtcb); ret = nxsched_release_tcb(dtcb, dtcb->flags & TCB_FLAG_TTYPE_MASK); #ifdef CONFIG_SMP