Renaming _ContextEntryRtn to _context_entry
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 -o -iname \*.kconf \) \ -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 <daniel.kalowsky@intel.com>
This commit is contained in:
parent
522b9ad432
commit
1cc59ccce9
6 changed files with 21 additions and 21 deletions
|
@ -100,7 +100,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */
|
||||||
* needed anymore.
|
* needed anymore.
|
||||||
*
|
*
|
||||||
* The initial context is a basic stack frame that contains arguments for
|
* The initial context is a basic stack frame that contains arguments for
|
||||||
* _ContextEntryRtn() return address, that points at _ContextEntryRtn()
|
* _context_entry() return address, that points at _context_entry()
|
||||||
* and status register.
|
* and status register.
|
||||||
*
|
*
|
||||||
* <options> is currently unused.
|
* <options> is currently unused.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* ctx_wrapper.s - wrapper for _ContextEntryRtn */
|
/* ctx_wrapper.s - wrapper for _context_entry */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 Wind River Systems, Inc.
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
* Wrapper for _ContextEntryRtn routine when called from
|
* Wrapper for _context_entry routine when called from
|
||||||
* the initial context
|
* the initial context
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -42,13 +42,13 @@
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
||||||
GTEXT(_ContextEntryWrapper)
|
GTEXT(_ContextEntryWrapper)
|
||||||
GTEXT(_ContextEntryRtn)
|
GTEXT(_context_entry)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _ContextEntryWrapper - wrapper for _ContextEntryRtn
|
* _ContextEntryWrapper - wrapper for _context_entry
|
||||||
*
|
*
|
||||||
* The routine pops parameters for the _ContextEntryRtn from
|
* The routine pops parameters for the _context_entry from
|
||||||
* stack frame, prepared by the _NewContext() routine
|
* stack frame, prepared by the _NewContext() routine
|
||||||
*
|
*
|
||||||
* RETURNS: N/A
|
* RETURNS: N/A
|
||||||
|
@ -60,5 +60,5 @@ SECTION_FUNC(TEXT, _ContextEntryWrapper)
|
||||||
pop_s r2
|
pop_s r2
|
||||||
pop_s r1
|
pop_s r1
|
||||||
pop_s r0
|
pop_s r0
|
||||||
j _ContextEntryRtn
|
j _context_entry
|
||||||
nop
|
nop
|
||||||
|
|
|
@ -122,7 +122,7 @@ void *_NewContext(
|
||||||
pInitCtx = (struct __esf *)(STACK_ROUND_DOWN(stackEnd) -
|
pInitCtx = (struct __esf *)(STACK_ROUND_DOWN(stackEnd) -
|
||||||
sizeof(struct __esf));
|
sizeof(struct __esf));
|
||||||
|
|
||||||
pInitCtx->pc = ((uint32_t)_ContextEntryRtn) & 0xfffffffe;
|
pInitCtx->pc = ((uint32_t)_context_entry) & 0xfffffffe;
|
||||||
pInitCtx->a1 = (uint32_t)pEntry;
|
pInitCtx->a1 = (uint32_t)pEntry;
|
||||||
pInitCtx->a2 = (uint32_t)parameter1;
|
pInitCtx->a2 = (uint32_t)parameter1;
|
||||||
pInitCtx->a3 = (uint32_t)parameter2;
|
pInitCtx->a3 = (uint32_t)parameter2;
|
||||||
|
|
|
@ -209,11 +209,11 @@ static void _NewContextInternal(
|
||||||
#ifdef CONFIG_GDB_INFO
|
#ifdef CONFIG_GDB_INFO
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* _ContextEntryWrapper - adjust stack before invoking _ContextEntryRtn
|
* _ContextEntryWrapper - adjust stack before invoking _context_entry
|
||||||
*
|
*
|
||||||
* This function adjusts the initial stack frame created by _NewContext()
|
* This function adjusts the initial stack frame created by _NewContext()
|
||||||
* such that the GDB stack frame unwinders recognize it as the outermost frame
|
* such that the GDB stack frame unwinders recognize it as the outermost frame
|
||||||
* in the context's stack. The function then jumps to _ContextEntryRtn().
|
* in the context's stack. The function then jumps to _context_entry().
|
||||||
*
|
*
|
||||||
* GDB normally stops unwinding a stack when it detects that it has
|
* GDB normally stops unwinding a stack when it detects that it has
|
||||||
* reached a function called main(). Kernel tasks, however, do not have
|
* reached a function called main(). Kernel tasks, however, do not have
|
||||||
|
@ -222,7 +222,7 @@ static void _NewContextInternal(
|
||||||
*
|
*
|
||||||
* Given the initial context created by _NewContext(), GDB expects to find a
|
* Given the initial context created by _NewContext(), GDB expects to find a
|
||||||
* return address on the stack immediately above the context entry routine
|
* return address on the stack immediately above the context entry routine
|
||||||
* _ContextEntryRtn, in the location occupied by the initial EFLAGS.
|
* _context_entry, in the location occupied by the initial EFLAGS.
|
||||||
* GDB attempts to examine the memory at this return address, which typically
|
* GDB attempts to examine the memory at this return address, which typically
|
||||||
* results in an invalid access to page 0 of memory.
|
* results in an invalid access to page 0 of memory.
|
||||||
*
|
*
|
||||||
|
@ -259,19 +259,19 @@ static void _NewContextInternal(
|
||||||
* The initial EFLAGS cannot be overwritten until after _Swap() has swapped in
|
* The initial EFLAGS cannot be overwritten until after _Swap() has swapped in
|
||||||
* the new context for the first time. This routine is called by _Swap() the
|
* the new context for the first time. This routine is called by _Swap() the
|
||||||
* first time that the new context is swapped in, and it jumps to
|
* first time that the new context is swapped in, and it jumps to
|
||||||
* _ContextEntryRtn after it has done its work.
|
* _context_entry after it has done its work.
|
||||||
*
|
*
|
||||||
* RETURNS: this routine does NOT return.
|
* RETURNS: this routine does NOT return.
|
||||||
*
|
*
|
||||||
* \NOMANUAL
|
* \NOMANUAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
__asm__("\t.globl _ContextEntryRtn\n"
|
__asm__("\t.globl _context_entry\n"
|
||||||
"\t.section .text\n"
|
"\t.section .text\n"
|
||||||
"_ContextEntryWrapper:\n" /* should place this func .s file and use
|
"_ContextEntryWrapper:\n" /* should place this func .s file and use
|
||||||
SECTION_FUNC */
|
SECTION_FUNC */
|
||||||
"\tmovl $0, (%esp)\n" /* zero initialEFLAGS location */
|
"\tmovl $0, (%esp)\n" /* zero initialEFLAGS location */
|
||||||
"\tjmp _ContextEntryRtn\n");
|
"\tjmp _context_entry\n");
|
||||||
#endif /* CONFIG_GDB_INFO */
|
#endif /* CONFIG_GDB_INFO */
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -318,7 +318,7 @@ void *_NewContext(
|
||||||
* setup for both contexts are equivalent.
|
* setup for both contexts are equivalent.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* push arguments required by _ContextEntryRtn() */
|
/* push arguments required by _context_entry() */
|
||||||
|
|
||||||
*--pInitialContext = (unsigned long)parameter3;
|
*--pInitialContext = (unsigned long)parameter3;
|
||||||
*--pInitialContext = (unsigned long)parameter2;
|
*--pInitialContext = (unsigned long)parameter2;
|
||||||
|
@ -333,21 +333,21 @@ void *_NewContext(
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Arrange for the _ContextEntryWrapper() function to be called
|
* Arrange for the _ContextEntryWrapper() function to be called
|
||||||
* to adjust the stack before _ContextEntryRtn() is invoked.
|
* to adjust the stack before _context_entry() is invoked.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
*--pInitialContext = (unsigned long)_ContextEntryWrapper;
|
*--pInitialContext = (unsigned long)_ContextEntryWrapper;
|
||||||
|
|
||||||
#else /* CONFIG_GDB_INFO */
|
#else /* CONFIG_GDB_INFO */
|
||||||
|
|
||||||
*--pInitialContext = (unsigned long)_ContextEntryRtn;
|
*--pInitialContext = (unsigned long)_context_entry;
|
||||||
|
|
||||||
#endif /* CONFIG_GDB_INFO */
|
#endif /* CONFIG_GDB_INFO */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* note: stack area for edi, esi, ebx, ebp, and eax registers can be
|
* note: stack area for edi, esi, ebx, ebp, and eax registers can be
|
||||||
* left
|
* left
|
||||||
* uninitialized, since _ContextEntryRtn() doesn't care about the values
|
* uninitialized, since _context_entry() doesn't care about the values
|
||||||
* of these registers when it begins execution
|
* of these registers when it begins execution
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ void _context_exit(tCCS *pContext)
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* _ContextEntryRtn - common context entry point function for kernel contexts
|
* _context_entry - common context entry point function for kernel contexts
|
||||||
*
|
*
|
||||||
* This function serves as the entry point for _all_ kernel contexts, i.e. both
|
* This function serves as the entry point for _all_ kernel contexts, i.e. both
|
||||||
* task and fiber contexts are instantiated such that initial execution starts
|
* task and fiber contexts are instantiated such that initial execution starts
|
||||||
|
@ -112,7 +112,7 @@ void _context_exit(tCCS *pContext)
|
||||||
* \NOMANUAL
|
* \NOMANUAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FUNC_NORETURN void _ContextEntryRtn(
|
FUNC_NORETURN void _context_entry(
|
||||||
_ContextEntry pEntry, /* address of app entry point function */
|
_ContextEntry pEntry, /* address of app entry point function */
|
||||||
_ContextArg parameter1, /* 1st arg to app entry point function */
|
_ContextArg parameter1, /* 1st arg to app entry point function */
|
||||||
_ContextArg parameter2, /* 2nd arg to app entry point function */
|
_ContextArg parameter2, /* 2nd arg to app entry point function */
|
||||||
|
|
|
@ -46,7 +46,7 @@ This module provides definitions for a wrapper
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void _ContextEntryRtn(_ContextEntry,
|
extern void _context_entry(_ContextEntry,
|
||||||
_ContextArg,
|
_ContextArg,
|
||||||
_ContextArg,
|
_ContextArg,
|
||||||
_ContextArg);
|
_ContextArg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue