From: batt Date: Mon, 26 Oct 2009 21:50:03 +0000 (+0000) Subject: Fix process stack size declaration. X-Git-Tag: 2.4.0~95 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ec655581947c0ffa382f23c1bed50099438c34ac;p=bertos.git Fix process stack size declaration. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3102 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index 4be0b25e..fa118c18 100644 --- a/bertos/kern/proc.h +++ b/bertos/kern/proc.h @@ -348,7 +348,7 @@ INLINE bool proc_allowed(void) */ #define PROC_DEFINE_STACK(name, size) \ STATIC_ASSERT((size) >= KERN_MINSTACKSIZE); \ - cpu_stack_t name[(size) / sizeof(cpu_stack_t)]; + cpu_stack_t name[((size) + sizeof(cpu_stack_t) - 1) / sizeof(cpu_stack_t)]; /* Memory fill codes to help debugging */ #if CONFIG_KERN_MONITOR