From 154873a3d023fc54a0d3b9d9b5623067637bbad4 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 31 Jan 2017 13:45:22 -0600 Subject: [PATCH] Timer logic: Add private function prototypes to eliminate a warning; Functions should not be inline because the may recurse. --- sched/sched/sched_timerexpiration.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index e5410fce42..e0215f6000 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -112,9 +112,23 @@ uint32_t g_oneshot_maxticks = UINT32_MAX; #endif +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) +static uint32_t sched_cpu_scheduler(int cpu, uint32_t ticks, bool noswitches); +#endif +#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) +static uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches); +#endif +static unsigned int sched_timer_process(unsigned int ticks, bool noswitches); +static void sched_timer_start(unsigned int ticks) + /**************************************************************************** * Private Data ****************************************************************************/ + /* This is the duration of the currently active timer or, when * sched_timer_expiration() is called, the duration of interval timer * that just expired. The value zero means that no timer was active. @@ -167,7 +181,7 @@ static struct timespec g_stop_time; ****************************************************************************/ #if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) -static inline uint32_t sched_cpu_scheduler(int cpu, uint32_t ticks, bool noswitches) +static uint32_t sched_cpu_scheduler(int cpu, uint32_t ticks, bool noswitches) { FAR struct tcb_s *rtcb = current_task(cpu); FAR struct tcb_s *ntcb = current_task(cpu); @@ -244,7 +258,7 @@ static inline uint32_t sched_cpu_scheduler(int cpu, uint32_t ticks, #endif /**************************************************************************** - * Name: sched_process_scheduler + * Name: sched_process_scheduler * * Description: * Check for operations specific to scheduling policy of the currently @@ -268,8 +282,7 @@ static inline uint32_t sched_cpu_scheduler(int cpu, uint32_t ticks, ****************************************************************************/ #if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) -static inline uint32_t sched_process_scheduler(uint32_t ticks, - bool noswitches) +static uint32_t sched_process_scheduler(uint32_t ticks, bool noswitches) { #ifdef CONFIG_SMP uint32_t minslice = UINT32_MAX;