Skip to content

Commit

Permalink
task_exit.c: Add missing sched_note_stop()
Browse files Browse the repository at this point in the history
A regression from apache#13728 ; sched_note_stop() is never called for tasks
that exit normally via exit().
  • Loading branch information
pussuw authored and acassis committed Oct 23, 2024
1 parent d1fd1ed commit 134ecf3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sched/task/task_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <sched.h>
#include <debug.h>

#include <nuttx/sched_note.h>

#include "sched/sched.h"

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 134ecf3

Please sign in to comment.