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
commit dfa24a056e7218bf7fd312ffb40451ceb38a9a7b Author: ligd <liguidi...@xiaomi.com> AuthorDate: Wed Nov 13 12:03:23 2024 +0800 sched: add some DEBUGASSERT when nxsched_release_tcb() Signed-off-by: ligd <liguidi...@xiaomi.com> --- sched/sched/sched_releasetcb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sched/sched/sched_releasetcb.c b/sched/sched/sched_releasetcb.c index 628e42ff07..ba830abd6a 100644 --- a/sched/sched/sched_releasetcb.c +++ b/sched/sched/sched_releasetcb.c @@ -107,6 +107,10 @@ int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t ttype) if (tcb) { + /* Released tcb shouldn't on any list */ + + DEBUGASSERT(tcb->flink == NULL && tcb->blink == NULL); + #ifndef CONFIG_DISABLE_POSIX_TIMERS /* Release any timers that the task might hold. We do this * before release the PID because it may still be trying to