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