This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 134ecf380b task_exit.c: Add missing sched_note_stop()
134ecf380b is described below

commit 134ecf380bcbc6a17a3155f1c543c5c7efaaf697
Author: Ville Juven <ville.ju...@unikie.com>
AuthorDate: Wed Oct 23 16:13:22 2024 +0300

    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 <sched.h>
 #include <debug.h>
 
+#include <nuttx/sched_note.h>
+
 #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

Reply via email to