Remove runtime stack alignment from _NewContext()
Runtime alignment of a context's stack is no longer necessary in _NewContext() as the memory is aligned (via the __stack tag) before calling _NewContext(). Change-Id: I31b7fd883ea3f1dcdb378e8ff508430bc75afcde Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
63d6a95738
commit
a45f691d12
3 changed files with 6 additions and 6 deletions
|
@ -109,7 +109,7 @@ static ALWAYS_INLINE void context_monitor_init(struct s_CCS *pCcs /* context */
|
|||
*/
|
||||
|
||||
void *_NewContext(
|
||||
char *pStackMem, /* pointer to stack memory */
|
||||
char *pStackMem, /* pointer to aligned stack memory */
|
||||
unsigned stackSize, /* stack size in bytes */
|
||||
_ContextEntry pEntry, /* context (thread) entry point routine */
|
||||
void *parameter1, /* first param to entry point */
|
||||
|
@ -122,7 +122,7 @@ void *_NewContext(
|
|||
char *stackEnd = pStackMem + stackSize;
|
||||
struct init_stack_frame *pInitCtx;
|
||||
|
||||
tCCS *pCcs = (void *)ROUND_UP(pStackMem, sizeof(uint32_t));
|
||||
tCCS *pCcs = (tCCS *) pStackMem;
|
||||
|
||||
/* carve the context entry struct from the "base" of the stack */
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ static ALWAYS_INLINE void _context_monitor_init(struct s_CCS *pCcs /* context */
|
|||
*/
|
||||
|
||||
void *_NewContext(
|
||||
char *pStackMem, /* stack memory */
|
||||
char *pStackMem, /* aligned stack memory */
|
||||
unsigned stackSize, /* stack size in bytes */
|
||||
_ContextEntry pEntry, /* entry point */
|
||||
void *parameter1, /* entry point first param */
|
||||
|
@ -115,7 +115,7 @@ void *_NewContext(
|
|||
{
|
||||
char *stackEnd = pStackMem + stackSize;
|
||||
struct __esf *pInitCtx;
|
||||
tCCS *pCcs = (void *)ROUND_UP(pStackMem, sizeof(uint32_t));
|
||||
tCCS *pCcs = (tCCS *) pStackMem;
|
||||
|
||||
/* carve the context entry struct from the "base" of the stack */
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ __asm__("\t.globl _context_entry\n"
|
|||
*/
|
||||
|
||||
void *_NewContext(
|
||||
char *pStackMem, /* pointer to context stack memory */
|
||||
char *pStackMem, /* pointer to aligned stack memory */
|
||||
unsigned stackSize, /* size of stack in bytes */
|
||||
_ContextEntry pEntry, /* context entry point function */
|
||||
void *parameter1, /* first parameter to context entry point function */
|
||||
|
@ -354,7 +354,7 @@ void *_NewContext(
|
|||
* stack
|
||||
*/
|
||||
|
||||
ccs = (tCCS *)ROUND_UP(pStackMem, STACK_ALIGN);
|
||||
ccs = (tCCS *) pStackMem;
|
||||
|
||||
_NewContextInternal(ccs, pStackMem, stackSize, priority, options);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue