From c5c7375e80a3e559af92e17f2e7d5db1c51266e7 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 b4bb1b84019b4..9a021849eba9e 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