Fix process stack size declaration.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Oct 2009 21:50:03 +0000 (21:50 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 26 Oct 2009 21:50:03 +0000 (21:50 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3102 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/proc.h

index 4be0b25eb8821a5361a7526a4ed2f3c6cc77fc41..fa118c188ac979d690fc2b9eb8026915d5534ca2 100644 (file)
@@ -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