Add strictly limit check: The current sporadic scheduler cannot handler duties > 50%
This commit is contained in:
parent
fb82061bf7
commit
3a93be8902
|
@ -163,8 +163,15 @@ int sched_setparam(pid_t pid, FAR const struct sched_param *param)
|
|||
/* The replenishment period must be greater than or equal to the
|
||||
* budget period.
|
||||
*/
|
||||
#if 1
|
||||
/* REVISIT: In the current implementation, the budget cannot exceed
|
||||
* half the duty.
|
||||
*/
|
||||
|
||||
if (repl_ticks < (2 * budget_ticks))
|
||||
#else
|
||||
if (repl_ticks < budget_ticks)
|
||||
#endif
|
||||
{
|
||||
errcode = EINVAL;
|
||||
goto errout_with_lock;
|
||||
|
|
|
@ -209,8 +209,15 @@ int sched_setscheduler(pid_t pid, int policy,
|
|||
/* The replenishment period must be greater than or equal to the
|
||||
* budget period.
|
||||
*/
|
||||
#if 1
|
||||
/* REVISIT: In the current implementation, the budget cannot
|
||||
* exceed half the duty.
|
||||
*/
|
||||
|
||||
if (repl_ticks < (2 * budget_ticks))
|
||||
#else
|
||||
if (repl_ticks < budget_ticks)
|
||||
#endif
|
||||
{
|
||||
errcode = EINVAL;
|
||||
goto errout_with_irq;
|
||||
|
|
Loading…
Reference in New Issue