X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=config_kern.h;h=1edbabe9dc389952ec577edca23635638efd86b9;hb=1b38e2c9925d6ec7fc50b327fc46d490f20d7ee0;hp=420a48e8bfe9d5e5fc774ed0307347521b3313fc;hpb=62f9988bccb9a9ae97e85ee551f839bdb150405b;p=bertos.git diff --git a/config_kern.h b/config_kern.h old mode 100755 new mode 100644 index 420a48e8..1edbabe9 --- a/config_kern.h +++ b/config_kern.h @@ -1,9 +1,34 @@ -/*! +/** * \file * * * \brief Kernel configuration parameters @@ -15,6 +40,9 @@ /*#* *#* $Log$ + *#* Revision 1.8 2006/07/19 12:56:24 bernie + *#* Convert to new Doxygen style. + *#* *#* Revision 1.7 2006/02/21 16:05:53 bernie *#* Move from cfg/ to top-level. *#* @@ -49,7 +77,7 @@ #include /* ARCH_EMUL */ -/*! +/** * \name Modules activation * * \{ @@ -66,14 +94,39 @@ /* EXPERIMENTAL */ #define CONFIG_KERN_PREEMPTIVE (0 && CONFIG_KERN_SCHED && CONFIG_KERN_TIMER) -#define CONFIG_KERN_QUANTUM 50 /*!< Time sharing quantum in timer ticks. */ +#define CONFIG_KERN_QUANTUM 50 /**< Time sharing quantum in timer ticks. */ #if (ARCH & ARCH_EMUL) - #define CONFIG_KERN_DEFSTACKSIZE 65536 + /* We need a large stack because system libraries are bloated */ + #define CONFIG_PROC_DEFSTACKSIZE 65536 #else - #define CONFIG_KERN_DEFSTACKSIZE 128 /*!< Default stack size for each thread. */ + /** + * 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(cpu_stack_t) \ + + 32 * sizeof(int)) #endif +/* OBSOLETE */ +#define CONFIG_KERN_DEFSTACKSIZE CONFIG_PROC_DEFSTACKSIZE + /* Memory fill codes to help debugging */ #if CONFIG_KERN_MONITOR #define CONFIG_KERN_STACKFILLCODE 0xA5A5