sched: add some DEBUGASSERT when nxsched_release_tcb()

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2024-11-13 12:03:23 +08:00 • committed by Alan C. Assis
parent 8c4e88fd4b
commit dfa24a056e

View file

@ -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