From 3b46b2d2af0d1532e2040f2c6b6d1eab6206fd4a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 2 Nov 2010 11:06:58 +0100 Subject: [PATCH] * fix stack assignment mixup for main / idle threads --- core/kernel_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/kernel_init.c b/core/kernel_init.c index 39d3e66094..d2d4622185 100644 --- a/core/kernel_init.c +++ b/core/kernel_init.c @@ -76,11 +76,11 @@ void kernel_init(void) sched_init(); - if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) { + if (thread_create(&idle_tcb, idle_stack, sizeof(idle_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) { printf("kernel_init(): error creating idle task.\n"); } - if (thread_create(&idle_tcb, idle_stack, sizeof(idle_stack), PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST, MAIN_FUNC, main_name) < 0) { + if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_MAIN, CREATE_WOUT_YIELD | CREATE_STACKTEST, MAIN_FUNC, main_name) < 0) { printf("kernel_init(): error creating main task.\n"); }