Fix a newly introduced compilation error when round roben scheduling is disabled

This commit is contained in:
Gregory Nutt 2015-07-23 13:35:48 -06:00
parent f6c102d4c0
commit 53a17bfd99

View File

@ -109,18 +109,19 @@ int sched_setscheduler(pid_t pid, int policy,
FAR const struct sched_param *param)
{
FAR struct tcb_s *tcb;
#if CONFIG_RR_INTERVAL > 0
irqstate_t saved_state;
#endif
int ret;
/* Check for supported scheduling policy */
if (policy != SCHED_FIFO
#if CONFIG_RR_INTERVAL > 0
if (policy != SCHED_FIFO && policy != SCHED_RR)
#else
if (policy != SCHED_FIFO)
&& policy != SCHED_RR
#endif
#ifdef CONFIG_SCHED_SPORADIC
&& policy != SCHED_SPORADIC
#endif
)
{
set_errno(EINVAL);
return ERROR;