diff --git a/arch/arm/timer/systick.c b/arch/arm/timer/systick.c index 56a9bfbb79..4fc36732bd 100644 --- a/arch/arm/timer/systick.c +++ b/arch/arm/timer/systick.c @@ -116,7 +116,7 @@ extern void _SysPowerSaveIdleExit(int32_t ticks); #endif /* CONFIG_ADVANCED_POWER_MANAGEMENT */ #ifdef CONFIG_TICKLESS_IDLE -extern int32_t _SysIdleElapsedTicks; +extern int32_t _sys_idle_elapsed_ticks; #endif /* CONFIG_TICKLESS_IDLE */ /* locals */ @@ -315,7 +315,7 @@ void _TIMER_INT_HANDLER(void *unused) if (idleMode == IDLE_TICKLESS) { /* tickless idle completed without interruption */ idleMode = IDLE_NOT_TICKLESS; - _SysIdleElapsedTicks = + _sys_idle_elapsed_ticks = idleOrigTicks + 1; /* actual # of idle ticks */ nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } else { @@ -325,7 +325,7 @@ void _TIMER_INT_HANDLER(void *unused) * Also, if not in tickless mode, _SysIdleElpasedTicks will be * 0. */ - _SysIdleElapsedTicks++; + _sys_idle_elapsed_ticks++; /* * If we transition from 0 elapsed ticks to 1 we need to @@ -334,13 +334,13 @@ void _TIMER_INT_HANDLER(void *unused) * _timer_idle_exit. */ - if (_SysIdleElapsedTicks == 1) { + if (_sys_idle_elapsed_ticks == 1) { nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } } /* accumulate total counter value */ - accumulatedCount += defaultLoadVal * _SysIdleElapsedTicks; + accumulatedCount += defaultLoadVal * _sys_idle_elapsed_ticks; #else /* !CONFIG_TICKLESS_IDLE */ /* * No tickless idle: @@ -544,7 +544,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ * the timer out of idle mode and generating an interrupt at the next * tick interval. It is expected that interrupts have been disabled. * -* Note that in this routine, _SysIdleElapsedTicks must be zero because the +* Note that in this routine, _sys_idle_elapsed_ticks must be zero because the * ticker has done its work and consumed all the ticks. This has to be true * otherwise idle mode wouldn't have been entered in the first place. * @@ -584,9 +584,9 @@ void _timer_idle_exit(void) * guaranteed * that the timer ISR will execute before the tick event is * serviced, - * so _SysIdleElapsedTicks is adjusted to account for it. + * so _sys_idle_elapsed_ticks is adjusted to account for it. */ - _SysIdleElapsedTicks = idleOrigTicks - 1; + _sys_idle_elapsed_ticks = idleOrigTicks - 1; nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } else { uint32_t elapsed; /* elapsed "counter time" */ @@ -615,9 +615,9 @@ void _timer_idle_exit(void) sysTickReloadSet(remaining); } - _SysIdleElapsedTicks = elapsed / defaultLoadVal; + _sys_idle_elapsed_ticks = elapsed / defaultLoadVal; - if (_SysIdleElapsedTicks) { + if (_sys_idle_elapsed_ticks) { /* Announce elapsed ticks to the microkernel */ nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } diff --git a/arch/x86/timer/hpet.c b/arch/x86/timer/hpet.c index 7807d0e314..600fd2b141 100644 --- a/arch/x86/timer/hpet.c +++ b/arch/x86/timer/hpet.c @@ -217,7 +217,7 @@ extern uint32_t _hw_irq_to_c_handler_latency; /* additional globals, locals, and forward declarations */ -extern int32_t _SysIdleElapsedTicks; +extern int32_t _sys_idle_elapsed_ticks; static uint32_t __noinit counterLoadValue; /* main counter units per system tick */ @@ -324,7 +324,7 @@ void _timer_int_handler(void *unused) * tickless mode, * _SysIdleElpasedTicks will be 0. */ - _SysIdleElapsedTicks++; + _sys_idle_elapsed_ticks++; /* * If we transistion from 0 elapsed ticks to 1 we need to announce the @@ -334,7 +334,7 @@ void _timer_int_handler(void *unused) * _timer_idle_exit */ - if (_SysIdleElapsedTicks == 1) { + if (_sys_idle_elapsed_ticks == 1) { nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } @@ -431,7 +431,7 @@ void _timer_idle_exit(void) * interrupt handler runs (which is unlikely, but could happen) */ - _SysIdleElapsedTicks = programmedTicks - 1; + _sys_idle_elapsed_ticks = programmedTicks - 1; /* * Announce elapsed ticks to the microkernel. Note we are @@ -459,7 +459,7 @@ void _timer_idle_exit(void) * note: a premature tick declaration has no significant impact on * the microkernel, which gets informed of the correct number of elapsed * ticks when the following tick finally occurs; however, any ISRs that - * access _SysIdleElapsedTicks to determine the current time may be + * access _sys_idle_elapsed_ticks to determine the current time may be *misled * during the (very brief) interval before the tick-in-progress finishes * and the following tick begins @@ -487,9 +487,9 @@ void _timer_idle_exit(void) * expires and the timer interrupt handler runs */ - _SysIdleElapsedTicks = elapsedTicks; + _sys_idle_elapsed_ticks = elapsedTicks; - if (_SysIdleElapsedTicks) { + if (_sys_idle_elapsed_ticks) { /* Announce elapsed ticks to the microkernel */ nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c index e74ac6a9ce..9041209da6 100644 --- a/arch/x86/timer/loApicTimer.c +++ b/arch/x86/timer/loApicTimer.c @@ -115,7 +115,7 @@ After reset, the timer is initialized to zero. /* globals */ #if defined(TIMER_SUPPORTS_TICKLESS) -extern int32_t _SysIdleElapsedTicks; +extern int32_t _sys_idle_elapsed_ticks; #endif /* TIMER_SUPPORTS_TICKLESS */ /* locals */ @@ -319,10 +319,10 @@ void _timer_int_handler(void *unused /* parameter is not used */ * tickless mode, * _SysIdleElpasedTicks will be 0. */ - _SysIdleElapsedTicks++; + _sys_idle_elapsed_ticks++; /* accumulate total counter value */ - accumulatedCount += counterLoadVal * _SysIdleElapsedTicks; + accumulatedCount += counterLoadVal * _sys_idle_elapsed_ticks; /* * If we transistion from 0 elapsed ticks to 1 we need to announce the @@ -330,7 +330,7 @@ void _timer_int_handler(void *unused /* parameter is not used */ * covered by _timer_idle_exit */ - if (_SysIdleElapsedTicks == 1) { + if (_sys_idle_elapsed_ticks == 1) { nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } @@ -519,7 +519,7 @@ void _timer_idle_exit(void) * mode */ _loApicTimerPeriodic(); _loApicTimerSetCount(counterLoadVal); - _SysIdleElapsedTicks = _IdleOrigTicks - 1; + _sys_idle_elapsed_ticks = _IdleOrigTicks - 1; _TimerMode = TIMER_MODE_PERIODIC; /* * Announce elapsed ticks to the microkernel. Note we are @@ -548,9 +548,9 @@ void _timer_idle_exit(void) _loApicTimerSetCount(remaining); } - _SysIdleElapsedTicks = elapsed / counterLoadVal; + _sys_idle_elapsed_ticks = elapsed / counterLoadVal; - if (_SysIdleElapsedTicks) { + if (_sys_idle_elapsed_ticks) { /* Announce elapsed ticks to the microkernel */ nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c index f23fdab00d..646d2fd117 100644 --- a/drivers/timer/i8253.c +++ b/drivers/timer/i8253.c @@ -118,7 +118,7 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ. /* globals */ #if defined(TIMER_SUPPORTS_TICKLESS) -extern int32_t _SysIdleElapsedTicks; +extern int32_t _sys_idle_elapsed_ticks; #endif /* locals */ @@ -288,7 +288,7 @@ void _timer_int_handler(void *unusedArg /* not used */ * tickless mode, * _SysIdleElpasedTicks will be 0. */ - _SysIdleElapsedTicks++; + _sys_idle_elapsed_ticks++; /* * If we transistion from 0 elapsed ticks to 1 we need to announce the @@ -296,12 +296,12 @@ void _timer_int_handler(void *unusedArg /* not used */ * covered by _timer_idle_exit */ - if (_SysIdleElapsedTicks == 1) { + if (_sys_idle_elapsed_ticks == 1) { nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } /* accumulate total counter value */ - accumulatedCount += counterLoadVal * _SysIdleElapsedTicks; + accumulatedCount += counterLoadVal * _sys_idle_elapsed_ticks; #else #if defined(CONFIG_MICROKERNEL) @@ -468,7 +468,7 @@ void _timer_idle_exit(void) /* Timer expired. Place back in periodic mode */ _i8253CounterPeriodic(counterLoadVal); _TimerMode = TIMER_MODE_PERIODIC; - _SysIdleElapsedTicks = _IdleOrigTicks - 1; + _sys_idle_elapsed_ticks = _IdleOrigTicks - 1; /* * Announce elapsed ticks to the microkernel. Note we are * guaranteed @@ -495,9 +495,9 @@ void _timer_idle_exit(void) _i8253CounterOneShot(remaining); } - _SysIdleElapsedTicks = elapsed / counterLoadVal; + _sys_idle_elapsed_ticks = elapsed / counterLoadVal; - if (_SysIdleElapsedTicks) { + if (_sys_idle_elapsed_ticks) { /* Announce elapsed ticks to the microkernel */ nano_isr_stack_push(&_k_command_stack, TICK_EVENT); } diff --git a/kernel/microkernel/timer/ticker.c b/kernel/microkernel/timer/ticker.c index e2cd30e718..35e747739f 100644 --- a/kernel/microkernel/timer/ticker.c +++ b/kernel/microkernel/timer/ticker.c @@ -57,7 +57,7 @@ static kpriority_t slice_prio = #ifdef CONFIG_TICKLESS_IDLE /* Number of ticks elapsed that have not been announced to the microkernel */ -int32_t _SysIdleElapsedTicks = 0; /* Initial value must be 0 */ +int32_t _sys_idle_elapsed_ticks = 0; /* Initial value must be 0 */ #endif /* units: us/tick */ @@ -221,8 +221,8 @@ static inline int32_t _SysIdleElapsedTicksGet(void) int key; key = irq_lock(); - ticks = _SysIdleElapsedTicks; - _SysIdleElapsedTicks = 0; + ticks = _sys_idle_elapsed_ticks; + _sys_idle_elapsed_ticks = 0; irq_unlock(key); return ticks; #else