X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Fcfg_kern.h;h=368e59d0387fed43e07a9602542dca0f24e41c55;hb=19e8a3eae634fead9c233f0c33adfb24c06365d4;hp=dd950b82f8f0651cc799f314215ff1c870594f81;hpb=9bde379b39600b3023bc42ea7affdab4edc8cf18;p=bertos.git diff --git a/bertos/cfg/cfg_kern.h b/bertos/cfg/cfg_kern.h index dd950b82..368e59d0 100644 --- a/bertos/cfg/cfg_kern.h +++ b/bertos/cfg/cfg_kern.h @@ -27,7 +27,7 @@ * the GNU General Public License. * * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/) - * Copyright 1999,2000,2001 Bernardo Innocenti + * Copyright 1999,2000,2001 Bernie Innocenti * * --> * @@ -35,13 +35,13 @@ * * \version $Id$ * - * \author Bernardo Innocenti + * \author Bernie Innocenti */ #ifndef CFG_KERN_H #define CFG_KERN_H -#include /* ARCH_EMUL */ +#include "cfg/cfg_arch.h" /* ARCH_EMUL */ /** * Multithreading kernel. @@ -67,59 +67,5 @@ #define CONFIG_KERN_QUANTUM 50 /**< Time sharing quantum in timer ticks. */ -#if (ARCH & ARCH_EMUL) - /* We need a large stack because system libraries are bloated */ - #define CONFIG_PROC_DEFSTACKSIZE 65536 -#else - /** - * Default stack size for each thread, in bytes. - * - * The goal here is to allow a minimal task to save all of its - * registers twice, plus push a maximum of 32 variables on the - * stack. - * - * The actual size computed by the default formula is: - * AVR: 102 - * i386: 156 - * ARM: 164 - * x86_64: 184 - * - * Note that on most 16bit architectures, interrupts will also - * run on the stack of the currently running process. Nested - * interrupts will greatly increases the amount of stack space - * required per process. Use irqmanager to minimize stack - * usage. - */ - #define CONFIG_PROC_DEFSTACKSIZE \ - (CPU_SAVED_REGS_CNT * 2 * sizeof(cpustack_t) \ - + 32 * sizeof(int)) -#endif - -/* OBSOLETE */ -#define CONFIG_KERN_DEFSTACKSIZE CONFIG_PROC_DEFSTACKSIZE - -/* Memory fill codes to help debugging */ -#if CONFIG_KERN_MONITOR - #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 #endif /* CFG_KERN_H */