Merge pull request #1547 from haukepetersen/fix_cortex_threadarch
cpu/cortex-mX_common: bugfix to arch_stack_init
This commit is contained in:
commit
d9b0927b57
@ -28,7 +28,6 @@
|
||||
#include "cpu.h"
|
||||
#include "kernel_internal.h"
|
||||
|
||||
|
||||
/**
|
||||
* @name noticeable marker marking the beginning of a stack segment
|
||||
*
|
||||
@ -67,7 +66,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
|
||||
int stack_size)
|
||||
{
|
||||
uint32_t *stk;
|
||||
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
|
||||
stk = (uint32_t *)((uint32_t)stack_start + stack_size);
|
||||
|
||||
/* marker */
|
||||
stk--;
|
||||
|
||||
@ -57,7 +57,7 @@ static void context_restore(void) NORETURN;
|
||||
char *thread_arch_stack_init(void *(*task_func)(void *), void *arg, void *stack_start, int stack_size)
|
||||
{
|
||||
uint32_t *stk;
|
||||
stk = (uint32_t *)((uint32_t *)stack_start + stack_size);
|
||||
stk = (uint32_t *)((uint32_t)stack_start + stack_size);
|
||||
|
||||
/* marker */
|
||||
stk--;
|
||||
|
||||
@ -63,7 +63,7 @@ char *thread_arch_stack_init(void *(*task_func)(void *),
|
||||
int stack_size)
|
||||
{
|
||||
uint32_t *stk;
|
||||
stk = (uint32_t *)((uint32_t*)stack_start + stack_size);
|
||||
stk = (uint32_t *)((uint32_t)stack_start + stack_size);
|
||||
|
||||
/* marker */
|
||||
stk--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user