From 11bc939d67fe554f94352ba8390a2a7877f4eb5b Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser <kaspar@schleiser.de> Date: Thu, 28 Oct 2010 11:31:19 +0200 Subject: [PATCH] * merge fixes --- core/kernel_init.c | 2 +- core/sched.c | 2 -- core/thread.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/kernel_init.c b/core/kernel_init.c index dca0b45c94..39d3e66094 100644 --- a/core/kernel_init.c +++ b/core/kernel_init.c @@ -76,7 +76,7 @@ void kernel_init(void) sched_init(); - if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_stack, idle_name) < 0) { + if (thread_create(&main_tcb, main_stack, sizeof(main_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) { printf("kernel_init(): error creating idle task.\n"); } diff --git a/core/sched.c b/core/sched.c index 907a635fd9..03e2f4f32a 100644 --- a/core/sched.c +++ b/core/sched.c @@ -149,14 +149,12 @@ extern void cpu_switch_context_exit(void); void sched_task_exit(void) { DEBUG("sched_task_exit(): ending task %s...\n", active_thread->name); - tcb* thread = (tcb*)active_thread; dINT(); sched_threads[active_thread->pid] = NULL; num_tasks--; sched_set_status((tcb*)active_thread, STATUS_STOPPED); - free(((tcb*)active_thread)->stack_start); active_thread = NULL; cpu_switch_context_exit(); } diff --git a/core/thread.c b/core/thread.c index 49fbc53a5c..779fc2b6b5 100644 --- a/core/thread.c +++ b/core/thread.c @@ -107,7 +107,7 @@ int thread_create(tcb *cb, char *stack, int stacksize, char priority, int flags, while (pid < MAXTHREADS) { if (sched_threads[pid] == NULL) { sched_threads[pid] = cb; - pd->pid = pid; + cb->pid = pid; break; } pid++; -- GitLab