X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=config_kern.h;h=c703b4def2006b2d058d81fa395e9c0a1e48af6b;hb=f5207bd1f7e86dccc484802550cb1e53bb403c50;hp=1edbabe9dc389952ec577edca23635638efd86b9;hpb=a38f52e713ae8e7c6acdd0062ac8fb4e3e59186a;p=bertos.git diff --git a/config_kern.h b/config_kern.h index 1edbabe9..c703b4de 100644 --- a/config_kern.h +++ b/config_kern.h @@ -120,7 +120,7 @@ * usage. */ #define CONFIG_PROC_DEFSTACKSIZE \ - (CPU_SAVED_REGS_CNT * 2 * sizeof(cpu_stack_t) \ + (CPU_SAVED_REGS_CNT * 2 * sizeof(cpustack_t) \ + 32 * sizeof(int)) #endif @@ -129,8 +129,26 @@ /* Memory fill codes to help debugging */ #if CONFIG_KERN_MONITOR - #define CONFIG_KERN_STACKFILLCODE 0xA5A5 - #define CONFIG_KERN_MEMFILLCODE 0xDBDB + #include + #if (SIZEOF_CPUSTACK_T == 1) + /* 8bit cpustack_t */ + #define CONFIG_KERN_STACKFILLCODE 0xA5 + #define CONFIG_KERN_MEMFILLCODE 0xDB + #elif (SIZEOF_CPUSTACK_T == 2) + /* 16bit cpustack_t */ + #define CONFIG_KERN_STACKFILLCODE 0xA5A5 + #define CONFIG_KERN_MEMFILLCODE 0xDBDB + #elif (SIZEOF_CPUSTACK_T == 4) + /* 16bit cpustack_t */ + #define CONFIG_KERN_STACKFILLCODE 0xA5A5A5A5UL + #define CONFIG_KERN_MEMFILLCODE 0xDBDBDBDBUL + #elif (SIZEOF_CPUSTACK_T == 8) + /* 16bit cpustack_t */ + #define CONFIG_KERN_STACKFILLCODE 0xA5A5A5A5A5A5A5A5UL + #define CONFIG_KERN_MEMFILLCODE 0xDBDBDBDBDBDBDBDBUL + #else + #error No cpustack_t size supported! + #endif #endif