From ec655581947c0ffa382f23c1bed50099438c34ac Mon Sep 17 00:00:00 2001 From: batt Date: Mon, 26 Oct 2009 21:50:03 +0000 Subject: [PATCH] Fix process stack size declaration. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3102 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.25.1