Moved the initialisation of t_stacktop and t_stacksize.
So they can be modified by the architecture dependent stack init.
@@ -129,10 +129,10 @@ os_task_init(struct os_task *t, const char *name, os_task_func_t func,
}
_clear_stack(stack_bottom, stack_size);
- t->t_stackptr = os_arch_task_stack_init(t, &stack_bottom[stack_size],
- stack_size);
t->t_stacktop = &stack_bottom[stack_size];
t->t_stacksize = stack_size;
+ t->t_stackptr = os_arch_task_stack_init(t, &stack_bottom[stack_size],
+ stack_size);
STAILQ_FOREACH(task, &g_os_task_list, t_os_task_list) {
assert(t->t_prio != task->t_prio);
