⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel.h

📁 ecos为实时嵌入式操作系统
💻 H
📖 第 1 页 / 共 4 页
字号:
 {{CFG_DATA cdl_component CYGPKG_KERNEL_MEMORY {     display    "Memory allocators"     type       dummy     parent     CYGPKG_KERNEL     description "         Configuration options related to the kernel memory allocation         support." } cdl_option CYGSEM_KERNEL_MEMORY_COALESCE {     display    "Coalesce memory in the variable-block allocator"     parent     CYGPKG_KERNEL_MEMORY     description "         The variable-block memory allocator can perform coalescing         of memory whenever the application code releases memory back         to the pool. This coalescing reduces the possibility of         memory fragmentation problems, but involves extra code and         processor cycles." } }}CFG_DATA */ #define CYGSEM_KERNEL_MEMORY_COALESCE/* --------------------------------------------------------------------- * Options related to source-level debugging and diagnostics. {{CFG_DATA cdl_component CYGPKG_KERNEL_DEBUG {     display    "Source-level debugging support"     type       dummy     parent     CYGPKG_KERNEL     description "         If the source level debugger gdb is to be used for debugging         application code then it may be necessary to configure in support         for this in the kernel." } # NOTE: does this require any other support ? cdl_option CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT {     display    "Include GDB multi-threading debug support"     parent     CYGPKG_KERNEL_DEBUG     requires   CYGVAR_KERNEL_THREADS_LIST     requires   CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT     description "         This option enables some extra kernel code which is needed         to support multi-threaded source level debugging." } }}CFG_DATA */#define CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT/* --------------------------------------------------------------------- * Kernel API's. The C++ one is the default. A C API is optional. * Support for other languages is possible. {{CFG_DATA cdl_component CYGPKG_KERNEL_API {     display    "Kernel APIs"     type       dummy     parent     CYGPKG_KERNEL     description "         The eCos kernel is implemented in C++, so a C++ interface         to the kernel is always available. There is also an optional         C API. Additional API's may be provided in future versions."         doc ref/ecos-ref/kernel-apis.html } cdl_option     CYGFUN_KERNEL_API_C {     display    "Provide C API"     parent     CYGPKG_KERNEL_API     description "         The eCos kernel is implemented in C++, but there is an         optional C API for use by application code. This C API can be         disabled if the application code does not invoke the kernel         directly, but instead uses higher level code such as the         uITRON compatibility layer." } }}CFG_DATA */#define CYGFUN_KERNEL_API_C /* --------------------------------------------------------------------- * The rest of this header file contains various fix-ups and * options which cannot yet be controlled via the GUI tool. * * First some miscellaneous scheduler support, all calculated. */#if defined(CYGSEM_KERNEL_SCHED_TIMESLICE) && defined(CYGSEM_KERNEL_SCHED_BITMAP)# error Timeslicing cannot be enabled if the bitmap scheduler is used.#endif/* * These #define's are for the system's internal use only and should * not be edited by users. */#ifdef CYGSEM_KERNEL_SCHED_BITMAP# define CYGPRI_KERNEL_SCHED_IMPL_HXX           <cyg/kernel/bitmap.hxx>#elif defined(CYGSEM_KERNEL_SCHED_MLQUEUE)# define CYGPRI_KERNEL_SCHED_IMPL_HXX           <cyg/kernel/mlqueue.hxx>#elif defined(CYGSEM_KERNEL_SCHED_LOTTERY)# define CYGPRI_KERNEL_SCHED_IMPL_HXX           <cyg/kernel/lottery.hxx>#else#error No Scheduler defined#endif#define CYGNUM_KERNEL_SCHED_BITMAP_SIZE         CYGNUM_KERNEL_SCHED_PRIORITIES/* --------------------------------------------------------------------- * Counter and clock related miscellania. * * If a real-time clock is enabled then there are additional * configuration options controlling the resolution of the clock, * CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION and * CYGNUM_KERNEL_COUNTERS_RTC_PERIOD. Different targets require * different default values, and the current configuration tool cannot * deal with this yet. Also the exact details of the resolution and * period values are still subject to change. * * To allow the clock settings to be controlled in some fashion, * there is a configuration option to override the default settings. * If this option is enabled then the resolution and period * #define's will come from configuration options (which do not * necessarily have sensible defaults, and which are not validated). * Otherwise the platform-specific numbers below are used. On * hardware this result in 100 clock interrupts every second. * For simulators slightly different values are used, so that the * various test cases run faster. */#ifdef CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE# define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION \        { CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR, \          CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR }# define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD#else /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE */#if defined(CYG_HAL_MN10300_STDEVAL1)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       150000#endif#if defined(CYG_HAL_MN10300_SIM)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       9999#endif#if defined(CYG_HAL_MIPS_JMR3904)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#if (CYGHWR_HAL_MIPS_CPU_FREQ == 50)# define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       15360#elif (CYGHWR_HAL_MIPS_CPU_FREQ == 66)# define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       20736#else#error Unsupported clock frequency#endif#endif#if defined(CYG_HAL_MIPS_SIM)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       999#endif#if defined(CYG_HAL_POWERPC_MPC860)// Period is busclock/16/100.#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       20833#endif#if defined(CYG_HAL_ARM_PID)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       12500#endif#if defined(CYG_HAL_ARM_AEB)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       (240000/16)#endif#if defined(CYG_HAL_I386_LINUX)#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       10000#endif#ifndef CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION#define CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION   {1000000000, 100}#define CYGNUM_KERNEL_COUNTERS_RTC_PERIOD       9999#endif#endif /* CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE *//* --------------------------------------------------------------------- * Thread-related miscellania. *  * These options provide for an assertion that the count value for counted * thread wakeups or for thread suspends do not exceed set limits.  This is * to help with debugging, to allow a runaaway loop, for example, to be * detected more easily. *  * If the option is not defined, no assert is included.  Whether asserts * are themselves included depends on infrastructure configury in infra.h * * It is hoped that these defaults are helpful rather than interfering. */#define CYGNUM_KERNEL_MAX_SUSPEND_COUNT_ASSERT          (500)#define CYGNUM_KERNEL_MAX_COUNTED_WAKE_COUNT_ASSERT     (500)/* * If the scheduler configuration only has a single priority level, * then the idle thread must yield each time around its loop. */#if CYGNUM_KERNEL_SCHED_PRIORITIES == 1#  define CYGIMP_IDLE_THREAD_YIELD#endif/* * Per thread data options. Per thread data suuport is based loosely * on that define by POSIX. Each thread has an array of slots, up to * CYGNUM_KERNEL_THREADS_DATA_MAX, that may contain data. Some of the * slots have been preallocated to specific packages. Others may be * allocated dynamically. */#define CYGNUM_KERNEL_THREADS_DATA_KERNEL       0#define CYGNUM_KERNEL_THREADS_DATA_ITRON        1#define CYGNUM_KERNEL_THREADS_DATA_LIBC         2#define CYGNUM_KERNEL_THREADS_DATA_POSIX        3#define CYGNUM_KERNEL_THREADS_DATA_ALL          0xF/* * Some consistency checks. */#if defined(CYGFUN_KERNEL_THREADS_TIMER) && !defined(CYGVAR_KERNEL_COUNTERS_CLOCK)# error "Cannot have Thread Timers without Real Time Clock"#endif#if defined(CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT) && !defined(CYGVAR_KERNEL_THREADS_LIST)# error "GDB thread support requires a list of all known threads."#endif/* --------------------------------------------------------------------- * Synchronization primitives miscellania. * * These lines should not be edited by users. */#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE# define CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE#endif#if defined(CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE) && !defined(CYGSEM_KERNEL_SCHED_MLQUEUE)# error "Priority inheritance can only be enabled if the mlqueue scheduler is used."#endif/* --------------------------------------------------------------------- * This code allows the kernel build to be configured as a GDB * stub ROM monitor. It is only intended for internal use. *//* * BLV: This code must be kept commented out for now, as it can * confuse the configuration tool. The correct solution is to have a * standard configuration for the system as represented by e.g. a * .ptest file which does the right thing. A ROM monitor is an * application, and application-specific configuration stuff should * not live in the master header file. *//* #undef CYG_HAL_ROM_MONITOR#ifdef CYG_HAL_ROM_MONITOR#undef CYGFUN_HAL_COMMON_KERNEL_SUPPORT#undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT#undef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK#undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING#undef CYGIMP_KERNEL_INTERRUPTS_CHAIN#undef CYGVAR_KERNEL_COUNTERS_CLOCK#undef CYGFUN_KERNEL_THREADS_TIMER#undef CYGPKG_KERNEL_EXCEPTIONS#undef CYGSEM_KERNEL_SCHED_TIMESLICE#undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE_SIMPLE#undef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INHERITANCE#undef CYGPKG_KERNEL_INSTRUMENT#undef CYGDBG_INFRA_DIAG_USE_DEVICE     // now lives in infra#define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS#endif*//* -------------------------------------------------------------------*/#endif  /* ifdef CYGPKG_KERNEL *//* -------------------------------------------------------------------*/#endif  /* CYGONCE_PKGCONF_KERNEL_H *//* EOF kernel.h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -