sched/semaphore: Convert strange use of DEBUGASSERT to DEBUGPANIC.
This commit is contained in:
parent
248c821730
commit
e8e3c2f362
1 changed files with 4 additions and 4 deletions
|
@ -338,7 +338,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder,
|
|||
if (!sched_verifytcb(htcb))
|
||||
{
|
||||
serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
DEBUGASSERT(sched_verifytcb(htcb));
|
||||
DEBUGPANIC();
|
||||
sem_freeholder(sem, pholder);
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ static int sem_restoreholderprio(FAR struct tcb_s *htcb,
|
|||
if (!sched_verifytcb(htcb))
|
||||
{
|
||||
serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb);
|
||||
DEBUGASSERT(sched_verifytcb(htcb));
|
||||
DEBUGPANIC();
|
||||
pholder = sem_findholder(sem, htcb);
|
||||
if (pholder != NULL)
|
||||
{
|
||||
|
@ -905,14 +905,14 @@ void sem_destroyholder(FAR sem_t *sem)
|
|||
if (sem->hhead != NULL)
|
||||
{
|
||||
serr("ERROR: Semaphore destroyed with holders\n");
|
||||
DEBUGASSERT(sem->hhead == NULL);
|
||||
DEBUGPANIC();
|
||||
(void)sem_foreachholder(sem, sem_recoverholders, NULL);
|
||||
}
|
||||
#else
|
||||
if (sem->holder[0].htcb != NULL || sem->holder[1].htcb != NULL)
|
||||
{
|
||||
DEBUGASSERT(sem->holder[0].htcb == NULL || sem->holder[1].htcb == NULL);
|
||||
serr("ERROR: Semaphore destroyed with holder\n");
|
||||
DEBUGPANIC();
|
||||
}
|
||||
|
||||
sem->holder[0].htcb = NULL;
|
||||
|
|
Loading…
Reference in a new issue