Optimizations to _NewContext() and _NewContextInternal()

Since the address of the new context is known before _NewContext() is invoked
(due to it being passed a properly aligned stack), there is no longer any
need for _NewContext to return the pointer to the context.

Furthermore, as a direct result of the properly aligned stack, the pointer to
the new context does not need to be passed as a separate parameter since it
will always match the passed stack pointer.

Change-Id: Ie57a9c4ad17f6f13e8b3f659cd701d4f8950ea97
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2015-05-25 10:21:57 -04:00 committed by Anas Nashif
commit 40b5200c73
9 changed files with 24 additions and 34 deletions

View file

@ -102,7 +102,7 @@ static ALWAYS_INLINE void _context_monitor_init(struct s_CCS *pCcs /* context */
* RETURNS: N/A
*/
void *_NewContext(
void _NewContext(
char *pStackMem, /* aligned stack memory */
unsigned stackSize, /* stack size in bytes */
_ContextEntry pEntry, /* entry point */
@ -146,6 +146,4 @@ void *_NewContext(
/* initial values in all other registers/CCS entries are irrelevant */
CONTEXT_MONITOR_INIT(pCcs);
return pCcs;
}