From c05d780c96b63f26d3843006e406973e8e2befeb Mon Sep 17 00:00:00 2001 From: Dan Kalowsky Date: Tue, 28 Apr 2015 11:35:51 -0700 Subject: [PATCH] Renaming _SysPowerSaveIdleExit to _sys_power_save_idle_exit Updating micro kernel functions to follow a consistent naming convention. Part of that process is the removal of camelCase naming conventions for the preferred_underscore_method. Change accomplished with the following script: #!/bin/bash echo "Searching for ${1} to replace with ${2}" echo "Checking C, CPP, H, HPP, and s files..." find . -type f \( -iname \*.[ch] -o -iname \*.[ch]pp -o -iname \*.s \) \ -not \( -path host/src/genIdt -prune \) \ -not \( -path host/src/gen_tables -prune \) \ -print | xargs sed -i "s/"${1}"/"${2}"/g" echo "Checking KCONF, LST, and PY files..." find . -type f \( -iname \*.lst -o -iname \*.kconf -o -iname \*.py \) \ -not \( -path host/src/genIdt -prune \) \ -not \( -path host/src/gen_tables -prune \) \ -print | xargs sed -i "s/"${1}"/"${2}"/g" Change-Id: Ife7e4fcd5a3f550d3da28d0c13f83c4adabe48a9 Signed-off-by: Dan Kalowsky --- arch/arm/core/isr_wrapper.s | 5 +++-- arch/arm/timer/systick.c | 8 ++++---- arch/x86/core/intstub.s | 6 +++--- kernel/microkernel/power.c | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/arm/core/isr_wrapper.s b/arch/arm/core/isr_wrapper.s index 8da828bfccf..d53058372a5 100644 --- a/arch/arm/core/isr_wrapper.s +++ b/arch/arm/core/isr_wrapper.s @@ -79,7 +79,8 @@ SECTION_FUNC(TEXT, _isr_wrapper) * the device for the next timer deadline is not interrupted. * For non-tickless idle, this ensures that the clearing of the kernel idle * state is not interrupted. - * In each case, _SysPowerSaveIdleExit is called with interrupts disabled. + * In each case, _sys_power_save_idle_exit is called with interrupts + * disabled. */ cpsid i /* PRIMASK = 1 */ @@ -90,7 +91,7 @@ SECTION_FUNC(TEXT, _isr_wrapper) ittt ne movne r1, #0 strne r1, [r2, #__tNANO_idle_OFFSET] /* clear kernel idle state */ - blxne _SysPowerSaveIdleExit + blxne _sys_power_save_idle_exit cpsie i /* re-enable interrupts (PRIMASK = 0) */ #endif /* CONFIG_ADVANCED_POWER_MANAGEMENT */ diff --git a/arch/arm/timer/systick.c b/arch/arm/timer/systick.c index 4fc36732bd5..81058c0edb4 100644 --- a/arch/arm/timer/systick.c +++ b/arch/arm/timer/systick.c @@ -112,7 +112,7 @@ extern uint32_t _hw_irq_to_c_handler_latency; #ifdef CONFIG_ADVANCED_POWER_MANAGEMENT extern int32_t _NanoIdleValGet(void); extern void _NanoIdleValClear(void); -extern void _SysPowerSaveIdleExit(int32_t ticks); +extern void _sys_power_save_idle_exit(int32_t ticks); #endif /* CONFIG_ADVANCED_POWER_MANAGEMENT */ #ifdef CONFIG_TICKLESS_IDLE @@ -292,7 +292,7 @@ void _TIMER_INT_HANDLER(void *unused) * For non-tickless idle, this ensures that the clearing of the kernel * idle * state is not interrupted. - * In each case, _SysPowerSaveIdleExit is called with interrupts + * In each case, _sys_power_save_idle_exit is called with interrupts * disabled. */ __asm__(" cpsid i"); /* PRIMASK = 1 */ @@ -361,7 +361,7 @@ void _TIMER_INT_HANDLER(void *unused) * Note that for tickless idle, nothing will be done in * _timer_idle_exit. */ - _SysPowerSaveIdleExit(numIdleTicks); + _sys_power_save_idle_exit(numIdleTicks); } __asm__(" cpsie i"); /* re-enable interrupts (PRIMASK = 0) */ @@ -540,7 +540,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ * * _timer_idle_exit - handling of tickless idle when interrupted * -* The routine, called by _SysPowerSaveIdleExit, is responsible for taking +* The routine, called by _sys_power_save_idle_exit, is responsible for taking * the timer out of idle mode and generating an interrupt at the next * tick interval. It is expected that interrupts have been disabled. * diff --git a/arch/x86/core/intstub.s b/arch/x86/core/intstub.s index 9b554efbb04..289d0fa92aa 100644 --- a/arch/x86/core/intstub.s +++ b/arch/x86/core/intstub.s @@ -66,7 +66,7 @@ entering and exiting a C interrupt handler. GTEXT(_Swap) #ifdef CONFIG_ADVANCED_POWER_MANAGEMENT - GTEXT(_SysPowerSaveIdleExit) + GTEXT(_sys_power_save_idle_exit) #endif /* CONFIG_ADVANCED_POWER_MANAGEMENT */ @@ -223,13 +223,13 @@ BRANCH_LABEL(_HandleIdle) movl $0, __tNANO_idle_OFFSET(%ecx) /* - * Beware that a timer driver's _SysPowerSaveIdleExit() implementation might + * Beware that a timer driver's _sys_power_save_idle_exit() implementation might * expect that interrupts are disabled when invoked. This ensures that * the calculation and programming of the device for the next timer * deadline is not interrupted. */ - call _SysPowerSaveIdleExit + call _sys_power_save_idle_exit add $0x4, %esp #ifdef CONFIG_INT_LATENCY_BENCHMARK call _int_latency_stop diff --git a/kernel/microkernel/power.c b/kernel/microkernel/power.c index 374c86e5aea..f698c9251c7 100644 --- a/kernel/microkernel/power.c +++ b/kernel/microkernel/power.c @@ -112,7 +112,7 @@ void _sys_power_save_idle(int32_t ticks) /******************************************************************************* * -* _SysPowerSaveIdleExit - power management policy when kernel leaves idle state +* _sys_power_save_idle_exit - power management policy when kernel leaves idle state * * This routine implements the power management policy when kernel leaves idle * state. Routine can be modified to wake up other devices. @@ -123,7 +123,7 @@ void _sys_power_save_idle(int32_t ticks) * \NOMANUAL */ -void _SysPowerSaveIdleExit(int32_t ticks) +void _sys_power_save_idle_exit(int32_t ticks) { #ifdef CONFIG_TICKLESS_IDLE if ((ticks == -1) || ticks >= _sys_idle_threshold_ticks) {