config_kern.h

Go to the documentation of this file.
00001 
00041 /*#*
00042  *#* $Log$
00043  *#* Revision 1.8  2006/07/19 12:56:24  bernie
00044  *#* Convert to new Doxygen style.
00045  *#*
00046  *#* Revision 1.7  2006/02/21 16:05:53  bernie
00047  *#* Move from cfg/ to top-level.
00048  *#*
00049  *#* Revision 1.3  2005/11/04 16:20:01  bernie
00050  *#* Fix reference to README.devlib in header.
00051  *#*
00052  *#* Revision 1.2  2005/04/11 19:10:27  bernie
00053  *#* Include top-level headers from cfg/ subdir.
00054  *#*
00055  *#* Revision 1.1  2005/04/11 19:04:13  bernie
00056  *#* Move top-level headers to cfg/ subdir.
00057  *#*
00058  *#* Revision 1.5  2004/08/25 14:12:08  rasky
00059  *#* Aggiornato il comment block dei log RCS
00060  *#*
00061  *#* Revision 1.4  2004/08/24 16:19:38  bernie
00062  *#* Add missing header.
00063  *#*
00064  *#* Revision 1.3  2004/07/30 14:24:16  rasky
00065  *#* Task switching con salvataggio perfetto stato di interrupt (SR)
00066  *#* Kernel monitor per dump informazioni su stack dei processi
00067  *#*
00068  *#* Revision 1.2  2004/06/03 11:27:09  bernie
00069  *#* Add dual-license information.
00070  *#*
00071  *#* Revision 1.1  2004/05/23 17:48:35  bernie
00072  *#* Add top-level files.
00073  *#*
00074  *#*/
00075 #ifndef CONFIG_KERN_H
00076 #define CONFIG_KERN_H
00077 
00078 #include <cfg/arch_config.h>  /* ARCH_EMUL */
00079 
00085 /*      Module/option          Active    Dependencies */
00086 #define CONFIG_KERN_SCHED       (1)
00087 #define CONFIG_KERN_SIGNALS     (1    && CONFIG_KERN_SCHED)
00088 #define CONFIG_KERN_TIMER       (1)
00089 #define CONFIG_KERN_HEAP        (0)
00090 #define CONFIG_KERN_SEMAPHORES  (0    && CONFIG_KERN_SIGNALS)
00091 #define CONFIG_KERN_MONITOR     (1    && CONFIG_KERN_SCHED)
00092 /*\}*/
00093 
00094 /* EXPERIMENTAL */
00095 #define CONFIG_KERN_PREEMPTIVE  (0    && CONFIG_KERN_SCHED && CONFIG_KERN_TIMER)
00096 
00097 #define CONFIG_KERN_QUANTUM     50    
00099 #if (ARCH & ARCH_EMUL)
00100     /* We need a large stack because system libraries are bloated */
00101     #define CONFIG_PROC_DEFSTACKSIZE  65536
00102 #else
00103 
00122     #define CONFIG_PROC_DEFSTACKSIZE  \
00123         (CPU_SAVED_REGS_CNT * 2 * sizeof(cpustack_t) \
00124         + 32 * sizeof(int))
00125 #endif
00126 
00127 /* OBSOLETE */
00128 #define CONFIG_KERN_DEFSTACKSIZE CONFIG_PROC_DEFSTACKSIZE
00129 
00130 /* Memory fill codes to help debugging */
00131 #if CONFIG_KERN_MONITOR
00132     #include <cpu/types.h>
00133     #if (SIZEOF_CPUSTACK_T == 1)
00134         /* 8bit cpustack_t */
00135         #define CONFIG_KERN_STACKFILLCODE  0xA5
00136         #define CONFIG_KERN_MEMFILLCODE    0xDB
00137     #elif (SIZEOF_CPUSTACK_T == 2)
00138         /* 16bit cpustack_t */
00139         #define CONFIG_KERN_STACKFILLCODE  0xA5A5
00140         #define CONFIG_KERN_MEMFILLCODE    0xDBDB
00141     #elif (SIZEOF_CPUSTACK_T == 4)
00142         /* 16bit cpustack_t */
00143         #define CONFIG_KERN_STACKFILLCODE  0xA5A5A5A5UL
00144         #define CONFIG_KERN_MEMFILLCODE    0xDBDBDBDBUL
00145     #elif (SIZEOF_CPUSTACK_T == 8)
00146         /* 16bit cpustack_t */
00147         #define CONFIG_KERN_STACKFILLCODE  0xA5A5A5A5A5A5A5A5UL
00148         #define CONFIG_KERN_MEMFILLCODE    0xDBDBDBDBDBDBDBDBUL
00149     #else
00150         #error No cpustack_t size supported!
00151     #endif
00152 #endif
00153 
00154 
00155 #endif /*  CONFIG_KERN_H */