sched/critmonitor: remove the assertion if counter == 0

Perf timer interface generally uses the hardware cycle counter
provided by the arch chip directly(such as DWT_CYCCNT(cortex-m)),
CYCCNT is a free running counter and counting upwards.
It wraps around to 0 on overflow.

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-01-24 21:49:20 +08:00 committed by Xiang Xiao
parent 48211f90d3
commit e781787cb9

View File

@ -280,7 +280,6 @@ void nxsched_resume_critmon(FAR struct tcb_s *tcb)
/* Yes.. Save the start time */
tcb->premp_start = current;
DEBUGASSERT(tcb->premp_start != 0);
/* Zero means that the timer is not ready */
@ -310,7 +309,6 @@ void nxsched_resume_critmon(FAR struct tcb_s *tcb)
/* Yes.. Save the start time */
tcb->crit_start = current;
DEBUGASSERT(tcb->crit_start != 0);
if (g_crit_start[cpu] == 0)
{