diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index a215f04999e49..8779f033110b9 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -347,26 +347,23 @@ static clock_t nxsched_timer_process(clock_t ticks, clock_t elapsed, nxsched_process_cpuload_ticks(elapsed); #endif - /* Process watchdogs */ + /* Check for operations specific to scheduling policy of the currently + * active task. + */ - tmp = wd_timer(ticks, noswitches); + tmp = nxsched_process_scheduler(ticks, elapsed, noswitches); if (tmp > 0) { rettime = tmp; } - /* Check for operations specific to scheduling policy of the currently - * active task. - */ - - tmp = nxsched_process_scheduler(ticks, elapsed, noswitches); + /* Process watchdogs */ -#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) + tmp = wd_timer(ticks, noswitches); if (tmp > 0 && (rettime == 0 || tmp < rettime)) { rettime = tmp; } -#endif return rettime; }