Guard from pend_reprios overlow
This commit is contained in:
parent
e1039128a4
commit
55fb9645a7
@ -110,6 +110,11 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio)
|
|||||||
wtcb->pend_reprios[wtcb->npend_reprio] = wtcb->sched_priority;
|
wtcb->pend_reprios[wtcb->npend_reprio] = wtcb->sched_priority;
|
||||||
wtcb->npend_reprio++;
|
wtcb->npend_reprio++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
serr("ERROR: CONFIG_SEM_NNESTPRIO exceeded\n");
|
||||||
|
DEBUGASSERT(wtcb->npend_reprio < CONFIG_SEM_NNESTPRIO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Raise the priority of the worker. This cannot cause a context
|
/* Raise the priority of the worker. This cannot cause a context
|
||||||
@ -129,8 +134,16 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio)
|
|||||||
* saved priority and not to the base priority.
|
* saved priority and not to the base priority.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
wtcb->pend_reprios[wtcb->npend_reprio] = reqprio;
|
if (wtcb->npend_reprio < CONFIG_SEM_NNESTPRIO)
|
||||||
wtcb->npend_reprio++;
|
{
|
||||||
|
wtcb->pend_reprios[wtcb->npend_reprio] = reqprio;
|
||||||
|
wtcb->npend_reprio++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
serr("ERROR: CONFIG_SEM_NNESTPRIO exceeded\n");
|
||||||
|
DEBUGASSERT(wtcb->npend_reprio < CONFIG_SEM_NNESTPRIO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user