Merge pull request #1547 from haukepetersen/fix_cortex_threadarch

cpu/cortex-mX_common: bugfix to arch_stack_init
This commit is contained in:
Hauke Petersen 2014-08-05 18:59:17 +02:00
commit d9b0927b57
3 changed files with 3 additions and 4 deletions

View File

@ -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--;

View File

@ -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--;

View File

@ -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--;