From 53a17bfd998477fb03f87dcef96b5f00a45dbb76 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Jul 2015 13:35:48 -0600 Subject: [PATCH] Fix a newly introduced compilation error when round roben scheduling is disabled --- sched/sched/sched_setscheduler.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sched/sched/sched_setscheduler.c b/sched/sched/sched_setscheduler.c index d069f59319..8849a426a9 100644 --- a/sched/sched/sched_setscheduler.c +++ b/sched/sched/sched_setscheduler.c @@ -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;