diff --git a/arch/arc/core/context.c b/arch/arc/core/context.c index 3258b30e41f..1cfb2e4455b 100644 --- a/arch/arc/core/context.c +++ b/arch/arc/core/context.c @@ -100,7 +100,7 @@ static ALWAYS_INLINE void toolsSupportInit(struct s_CCS *pCcs /* context */ * needed anymore. * * 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. * * is currently unused. diff --git a/arch/arc/core/context_wrapper.s b/arch/arc/core/context_wrapper.s index 3ab2354ff3e..f9ea051f661 100644 --- a/arch/arc/core/context_wrapper.s +++ b/arch/arc/core/context_wrapper.s @@ -1,4 +1,4 @@ -/* ctx_wrapper.s - wrapper for _ContextEntryRtn */ +/* ctx_wrapper.s - wrapper for _context_entry */ /* * Copyright (c) 2014 Wind River Systems, Inc. @@ -32,7 +32,7 @@ /* * DESCRIPTION - * Wrapper for _ContextEntryRtn routine when called from + * Wrapper for _context_entry routine when called from * the initial context */ @@ -42,13 +42,13 @@ #include 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 * * RETURNS: N/A @@ -60,5 +60,5 @@ SECTION_FUNC(TEXT, _ContextEntryWrapper) pop_s r2 pop_s r1 pop_s r0 - j _ContextEntryRtn + j _context_entry nop diff --git a/arch/arm/core/nanocontext.c b/arch/arm/core/nanocontext.c index d6b49b16a0c..ff16fc52c33 100644 --- a/arch/arm/core/nanocontext.c +++ b/arch/arm/core/nanocontext.c @@ -122,7 +122,7 @@ void *_NewContext( pInitCtx = (struct __esf *)(STACK_ROUND_DOWN(stackEnd) - sizeof(struct __esf)); - pInitCtx->pc = ((uint32_t)_ContextEntryRtn) & 0xfffffffe; + pInitCtx->pc = ((uint32_t)_context_entry) & 0xfffffffe; pInitCtx->a1 = (uint32_t)pEntry; pInitCtx->a2 = (uint32_t)parameter1; pInitCtx->a3 = (uint32_t)parameter2; diff --git a/arch/x86/core/nanocontext.c b/arch/x86/core/nanocontext.c index f50d0be6a4c..7de16349ea5 100644 --- a/arch/x86/core/nanocontext.c +++ b/arch/x86/core/nanocontext.c @@ -209,11 +209,11 @@ static void _NewContextInternal( #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() * 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 * 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 * 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 * 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 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 -* _ContextEntryRtn after it has done its work. +* _context_entry after it has done its work. * * RETURNS: this routine does NOT return. * * \NOMANUAL */ -__asm__("\t.globl _ContextEntryRtn\n" +__asm__("\t.globl _context_entry\n" "\t.section .text\n" "_ContextEntryWrapper:\n" /* should place this func .s file and use SECTION_FUNC */ "\tmovl $0, (%esp)\n" /* zero initialEFLAGS location */ - "\tjmp _ContextEntryRtn\n"); + "\tjmp _context_entry\n"); #endif /* CONFIG_GDB_INFO */ /******************************************************************************* @@ -318,7 +318,7 @@ void *_NewContext( * setup for both contexts are equivalent. */ - /* push arguments required by _ContextEntryRtn() */ + /* push arguments required by _context_entry() */ *--pInitialContext = (unsigned long)parameter3; *--pInitialContext = (unsigned long)parameter2; @@ -333,21 +333,21 @@ void *_NewContext( /* * 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; #else /* CONFIG_GDB_INFO */ - *--pInitialContext = (unsigned long)_ContextEntryRtn; + *--pInitialContext = (unsigned long)_context_entry; #endif /* CONFIG_GDB_INFO */ /* * note: stack area for edi, esi, ebx, ebp, and eax registers can be * 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 */ diff --git a/kernel/nanokernel/core/nanocontextentry.c b/kernel/nanokernel/core/nanocontextentry.c index 2b86638564c..8dfd0d09d97 100644 --- a/kernel/nanokernel/core/nanocontextentry.c +++ b/kernel/nanokernel/core/nanocontextentry.c @@ -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 * task and fiber contexts are instantiated such that initial execution starts @@ -112,7 +112,7 @@ void _context_exit(tCCS *pContext) * \NOMANUAL */ -FUNC_NORETURN void _ContextEntryRtn( +FUNC_NORETURN void _context_entry( _ContextEntry pEntry, /* address of app entry point function */ _ContextArg parameter1, /* 1st arg to app entry point function */ _ContextArg parameter2, /* 2nd arg to app entry point function */ diff --git a/kernel/nanokernel/include/nanocontextentry.h b/kernel/nanokernel/include/nanocontextentry.h index f6844142e11..8b6edb8f13b 100644 --- a/kernel/nanokernel/include/nanocontextentry.h +++ b/kernel/nanokernel/include/nanocontextentry.h @@ -46,7 +46,7 @@ This module provides definitions for a wrapper extern "C" { #endif -extern void _ContextEntryRtn(_ContextEntry, +extern void _context_entry(_ContextEntry, _ContextArg, _ContextArg, _ContextArg);