From 1d88dc1fb6a683cafe2bdbe134ace1e43f804dec Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 24 Jul 2015 14:35:07 -0600 Subject: [PATCH] Fix some compilation error when both TICKLESS mode and the SPORADIC scheduler are enabled --- sched/sched/sched_timerexpiration.c | 8 ++++---- sched/sched/sched_unlock.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index ed41d36fe1..8393be3e83 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -73,7 +73,7 @@ #define KEEP_ALIVE_HACK 1 -#ifdef CONFIG_RR_INTERVAL > 0 +#if CONFIG_RR_INTERVAL > 0 # define KEEP_ALIVE_TICKS MSEC2TICK(CONFIG_RR_INTERVAL) #else # define KEEP_ALIVE_TICKS MSEC2TICK(50) @@ -284,7 +284,7 @@ static inline uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches) if (rtcb != ntcb) { - return sched_process_scheduler(0, true) + return sched_process_scheduler(0, true); } /* Returning zero means that there is no interesting event to be timed */ @@ -294,9 +294,9 @@ static inline uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches) { /* Apply the keep alive hack */ - return KEEP_ALIVE_TICKS + return KEEP_ALIVE_TICKS; } -#else +#endif return ret; } diff --git a/sched/sched/sched_unlock.c b/sched/sched/sched_unlock.c index cf14deb503..6ac0ad49ab 100644 --- a/sched/sched/sched_unlock.c +++ b/sched/sched/sched_unlock.c @@ -156,7 +156,7 @@ int sched_unlock(void) * change the currently active task. */ - if (rtcb = (FAR struct tcb_s*)g_readytorun.head) + if (rtcb == (FAR struct tcb_s*)g_readytorun.head) { sched_timer_reassess(); }