Fix a newly introduced compilation error when round roben scheduling is disabled
This commit is contained in:
parent
f6c102d4c0
commit
53a17bfd99
@ -109,18 +109,19 @@ int sched_setscheduler(pid_t pid, int policy,
|
|||||||
FAR const struct sched_param *param)
|
FAR const struct sched_param *param)
|
||||||
{
|
{
|
||||||
FAR struct tcb_s *tcb;
|
FAR struct tcb_s *tcb;
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
|
||||||
irqstate_t saved_state;
|
irqstate_t saved_state;
|
||||||
#endif
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Check for supported scheduling policy */
|
/* Check for supported scheduling policy */
|
||||||
|
|
||||||
|
if (policy != SCHED_FIFO
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
#if CONFIG_RR_INTERVAL > 0
|
||||||
if (policy != SCHED_FIFO && policy != SCHED_RR)
|
&& policy != SCHED_RR
|
||||||
#else
|
|
||||||
if (policy != SCHED_FIFO)
|
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SCHED_SPORADIC
|
||||||
|
&& policy != SCHED_SPORADIC
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user