From df50981dba7da592806485c57bce19b214a2ef28 Mon Sep 17 00:00:00 2001 From: Dan Kalowsky Date: Thu, 16 Apr 2015 12:25:10 -0700 Subject: [PATCH] Replacing _IntLatencyStop with _int_latency_stop Updating nano 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}" find . -type f \( -iname \*.c -o -iname \*.h -o -iname \*.s \) \ -not \( -path host/src/genIdt -prune \) \ \ -not \( -path host/src/gen_tables -prune \) \ -print | xargs sed -i "s/"${1}"/"${2}"/g" Signed-off-by: Dan Kalowsky --- arch/x86/core/cpuhalt.s | 4 ++-- arch/x86/core/intstub.s | 12 ++++++------ arch/x86/core/swap.s | 2 +- include/nanokernel/x86/arch.h | 8 ++++---- kernel/nanokernel/core/int_latency_bench.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/x86/core/cpuhalt.s b/arch/x86/core/cpuhalt.s index ee36f58ce8..17310da53e 100644 --- a/arch/x86/core/cpuhalt.s +++ b/arch/x86/core/cpuhalt.s @@ -82,7 +82,7 @@ by nano_cpu_atomic_idle(). SECTION_FUNC(TEXT, nano_cpu_idle) #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif #if defined(CONFIG_BOOT_TIME_MEASUREMENT) rdtsc /* record idle timestamp */ @@ -122,7 +122,7 @@ SECTION_FUNC(TEXT, nano_cpu_idle) SECTION_FUNC(TEXT, nano_cpu_atomic_idle) #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif sti /* make sure interrupts are enabled */ diff --git a/arch/x86/core/intstub.s b/arch/x86/core/intstub.s index 1b94d43791..9b554efbb0 100644 --- a/arch/x86/core/intstub.s +++ b/arch/x86/core/intstub.s @@ -72,7 +72,7 @@ entering and exiting a C interrupt handler. #ifdef CONFIG_INT_LATENCY_BENCHMARK GTEXT(_int_latency_start) - GTEXT(_IntLatencyStop) + GTEXT(_int_latency_stop) #endif /******************************************************************************* * @@ -209,7 +209,7 @@ BRANCH_LABEL(alreadyOnIntStack) #ifdef CONFIG_INT_LATENCY_BENCHMARK /* preserve eax which contain stub return address */ pushl %eax - call _IntLatencyStop + call _int_latency_stop popl %eax #endif @@ -232,7 +232,7 @@ BRANCH_LABEL(_HandleIdle) call _SysPowerSaveIdleExit add $0x4, %esp #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif sti /* re-enable interrupts */ popl %eax @@ -347,7 +347,7 @@ SECTION_FUNC(TEXT, _IntExit) /* Restore volatile registers and return to the interrupted context */ #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif popl %edx @@ -379,7 +379,7 @@ BRANCH_LABEL(noReschedule) BRANCH_LABEL(nestedInterrupt) #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif popl %edx /* pop volatile registers in reverse order */ popl %ecx @@ -516,7 +516,7 @@ SECTION_FUNC(TEXT, irq_unlock) testl $0x200, SP_ARG1(%esp) jz skipIntEnable #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif sti BRANCH_LABEL(skipIntEnable) diff --git a/arch/x86/core/swap.s b/arch/x86/core/swap.s index 1b2c61b318..7e9d375ef4 100644 --- a/arch/x86/core/swap.s +++ b/arch/x86/core/swap.s @@ -380,7 +380,7 @@ BRANCH_LABEL(CROHandlingDone) /* save %eax since it used as the return value for _Swap */ pushl %eax /* interrupts are being reenabled, stop accumulating time */ - call _IntLatencyStop + call _int_latency_stop /* restore _Swap's %eax */ popl %eax diff --git a/include/nanokernel/x86/arch.h b/include/nanokernel/x86/arch.h index 771b3630fb..dd6ffbf994 100644 --- a/include/nanokernel/x86/arch.h +++ b/include/nanokernel/x86/arch.h @@ -260,7 +260,7 @@ static inline void irq_unlock(unsigned int key) {} #ifdef CONFIG_INT_LATENCY_BENCHMARK void _int_latency_start (void); -void _IntLatencyStop (void); +void _int_latency_stop (void); #endif /******************************************************************************* @@ -361,7 +361,7 @@ static inline __attribute__((always_inline)) { /* * The assembler code is split into two parts and - * _IntLatencyStop (); is invoked as a legitimate C + * _int_latency_stop (); is invoked as a legitimate C * function to let the compiler preserve registers * before the function invocation * @@ -385,7 +385,7 @@ static inline __attribute__((always_inline)) #endif #ifdef CONFIG_INT_LATENCY_BENCHMARK - _IntLatencyStop (); + _int_latency_stop (); #endif __asm__ volatile ( @@ -413,7 +413,7 @@ __asm volatile void irq_unlock_inline testl $0x200, key jz end #ifdef CONFIG_INT_LATENCY_BENCHMARK - call _IntLatencyStop + call _int_latency_stop #endif /* CONFIG_INT_LATENCY_BENCHMARK */ sti end: diff --git a/kernel/nanokernel/core/int_latency_bench.c b/kernel/nanokernel/core/int_latency_bench.c index c077d56cff..a4347331d7 100644 --- a/kernel/nanokernel/core/int_latency_bench.c +++ b/kernel/nanokernel/core/int_latency_bench.c @@ -106,7 +106,7 @@ void _int_latency_start(void) * */ -void _IntLatencyStop(void) +void _int_latency_stop(void) { uint32_t delta; uint32_t delayOverhead; @@ -189,7 +189,7 @@ void intLatencyInit(void) nestingDelay = timer_read() - nestingDelay - timeToReadTime; stopDelay = timer_read(); - _IntLatencyStop(); + _int_latency_stop(); stopDelay = timer_read() - stopDelay - timeToReadTime; /* re-initialize globals to default values */