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().
This commit is contained in:
Ville Juven 2024-10-23 16:13:22 +03:00 committed by Alan C. Assis
parent d1fd1ed8f6
commit 134ecf380b
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,8 @@
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/sched_note.h>
#include "sched/sched.h" #include "sched/sched.h"
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
@ -141,6 +143,7 @@ int nxtask_exit(void)
#endif #endif
dtcb->task_state = TSTATE_TASK_INACTIVE; dtcb->task_state = TSTATE_TASK_INACTIVE;
sched_note_stop(dtcb);
ret = nxsched_release_tcb(dtcb, dtcb->flags & TCB_FLAG_TTYPE_MASK); ret = nxsched_release_tcb(dtcb, dtcb->flags & TCB_FLAG_TTYPE_MASK);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP