X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=app%2Fdemo%2Fcfg%2Fcfg_kern.h;h=8dbd6608bb0f40cf27b0bdc16c63cb3965161231;hb=46cacdd7cf98dd977225deceb6ec3f08ef11a81f;hp=086bdf1148585eb963e32534d9b0c95220a8d01d;hpb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;p=bertos.git diff --git a/app/demo/cfg/cfg_kern.h b/app/demo/cfg/cfg_kern.h index 086bdf11..8dbd6608 100644 --- a/app/demo/cfg/cfg_kern.h +++ b/app/demo/cfg/cfg_kern.h @@ -26,15 +26,13 @@ * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. * - * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/) - * Copyright 1999,2000,2001 Bernie Innocenti - * + * Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/) + * Copyright 1999, 2000, 2001, 2008 Bernie Innocenti * --> * * \brief Kernel configuration parameters * * \version $Id$ - * * \author Bernie Innocenti */ @@ -44,12 +42,12 @@ #include "cfg/cfg_arch.h" /* ARCH_EMUL */ /** - * Multithreading kernel. + * Enable the multithreading kernel. */ #define CONFIG_KERNEL 1 /** - * \name Modules activation + * \name Optional kernel features * * \{ */ @@ -63,63 +61,18 @@ /*\}*/ /* EXPERIMENTAL */ -#define CONFIG_KERN_PREEMPTIVE (0 && CONFIG_KERN_SCHED && CONFIG_KERN_TIMER) +#define CONFIG_KERN_PREEMPT (1 && CONFIG_KERN_SCHED && CONFIG_KERN_TIMER) -#define CONFIG_KERN_QUANTUM 50 /**< Time sharing quantum in timer ticks. */ +/* OBSOLETE */ +#define CONFIG_KERN_PREEMPTIVE CONFIG_KERN_PREEMPT -#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 +/// Time sharing quantum in timer ticks. +#define CONFIG_KERN_QUANTUM 50 -/* OBSOLETE */ -#define CONFIG_KERN_DEFSTACKSIZE CONFIG_PROC_DEFSTACKSIZE +/// Module logging level. +#define KERN_LOG_LEVEL LOG_LVL_ERR -/* 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 +/// Module logging format. +#define KERN_LOG_FORMAT LOG_FMT_VERBOSE #endif /* CFG_KERN_H */