From: asterix Date: Thu, 10 Sep 2009 09:46:21 +0000 (+0000) Subject: Compute correct stack size. X-Git-Tag: 2.2.0~49 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=07dfe32a0fca085575d2291126d25a23fce0c27e;p=bertos.git Compute correct stack size. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2919 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index 1b9042a7..437145ed 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -216,7 +216,7 @@ struct Process *proc_new_with_name(UNUSED_ARG(const char *, name), void (*entry) proc->stack--; } - stack_size = stack_size - PROC_SIZE_WORDS; + stack_size -= PROC_SIZE_WORDS * sizeof(cpu_stack_t); proc_init_struct(proc); proc->user_data = data;