From 9ab67dce75977b92a8c872d51bdbe1f8b6816859 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 28 Aug 2014 17:00:03 -0600 Subject: [PATCH] In some configurations, g_system_tmer must be extern'ed as a private variable --- sched/clock/clock.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sched/clock/clock.h b/sched/clock/clock.h index 976ec117fb..f875d3e842 100644 --- a/sched/clock/clock.h +++ b/sched/clock/clock.h @@ -66,14 +66,25 @@ /******************************************************************************** * Global Variables ********************************************************************************/ +#if !defined(CONFIG_SCHED_TICKLESS) && __HAVE_KERNEL_GLOBALS == 0 + /* The system clock exists (CONFIG_SCHED_TICKLESS), but it not prototyped + * globally in include/nuttx/clock.h. + */ -#ifdef CONFIG_SYSTEM_TIME64 -extern uint64_t g_tickbias; -#else -extern uint32_t g_tickbias; +# ifdef CONFIG_SYSTEM_TIME64 +extern volatile uint64_t g_system_timer; +# else +extern volatile uint32_t g_system_timer; +# endif #endif -extern struct timespec g_basetime; +#ifdef CONFIG_SYSTEM_TIME64 +extern uint64_t g_tickbias; +#else +extern uint32_t g_tickbias; +#endif + +extern struct timespec g_basetime; /******************************************************************************** * Public Function Prototypes