mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 05:47:54 +00:00
Merged in david_s5/nuttx/upstream_prio_lpwork (pull request #271)
lp_worker:Guard from pend_reprios overlow Approved-by: Gregory Nutt
This commit is contained in:
commit
89717094eb
1 changed files with 15 additions and 2 deletions
|
|
@ -110,6 +110,11 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio)
|
|||
wtcb->pend_reprios[wtcb->npend_reprio] = wtcb->sched_priority;
|
||||
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
|
||||
|
|
@ -129,8 +134,16 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio)
|
|||
* saved priority and not to the base priority.
|
||||
*/
|
||||
|
||||
wtcb->pend_reprios[wtcb->npend_reprio] = reqprio;
|
||||
wtcb->npend_reprio++;
|
||||
if (wtcb->npend_reprio < CONFIG_SEM_NNESTPRIO)
|
||||
{
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue