Skip to content
Snippets Groups Projects
Commit 2dcce17b authored by Joseph Noir's avatar Joseph Noir Committed by GitHub
Browse files

Merge pull request #5682 from LudwigKnuepfer/pr/fix-5680

cpu/native: fix thread_stack_init
parents eea0dd4e 05d4b2f8
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ char *thread_stack_init(thread_task_func_t task_func, void *arg, void *stack_sta ...@@ -94,7 +94,7 @@ char *thread_stack_init(thread_task_func_t task_func, void *arg, void *stack_sta
stk = stack_start; stk = stack_start;
p = (ucontext_t *)(stk + ((stacksize - sizeof(ucontext_t)) / sizeof(void *))); p = (ucontext_t *)(stk + (stacksize - sizeof(ucontext_t)));
stacksize -= sizeof(ucontext_t); stacksize -= sizeof(ucontext_t);
if (getcontext(p) == -1) { if (getcontext(p) == -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment