git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1755 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-03-19 12:48:54 +00:00
parent 05af5534a9
commit 79075f9e81
22 changed files with 1838 additions and 1663 deletions

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 10 #define CH_TIME_QUANTUM 10
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -64,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -339,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -387,8 +392,8 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global * @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL. * @p panic_msg variable set to @p NULL.
*/ */
@ -431,7 +436,9 @@
*/ */
#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__) #if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
#define THREAD_EXT_FIELDS \ #define THREAD_EXT_FIELDS \
/* Add threads custom fields here.*/ struct { \
/* Add threads custom fields here.*/ \
};
#endif #endif
/** /**

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -24,6 +24,7 @@
* contains the application specific kernel settings. * contains the application specific kernel settings.
* *
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE

View File

@ -92,11 +92,33 @@ typedef struct {
extern ReadyList rlist; extern ReadyList rlist;
#endif /* !defined(PORT_OPTIMIZED_RLIST_EXT) */ #endif /* !defined(PORT_OPTIMIZED_RLIST_EXT) */
#ifdef CH_CURRP_REGISTER_CACHE /**
register Thread *currp asm(CH_CURRP_REGISTER_CACHE); * @brief Current thread pointer access macro.
#else * @note This macro is not meant to be used in the application code but
* only from within the kernel, use the @p chThdSelf() API instead.
* @note It is forbidden to use this macro in order to change the pointer
* (currp = something), use @p setcurrp() instead.
*/
#if !defined(PORT_OPTIMIZED_CURRP) || defined(__DOXYGEN__)
#if !defined(CH_CURRP_REGISTER_CACHE) || defined(__DOXYGEN__)
#define currp rlist.r_current #define currp rlist.r_current
#endif #else /* defined(CH_CURRP_REGISTER_CACHE) */
register Thread *currp asm(CH_CURRP_REGISTER_CACHE);
#endif /* defined(CH_CURRP_REGISTER_CACHE) */
#endif /* !defined(PORT_OPTIMIZED_CURRP) */
/**
* @brief Current thread pointer change macro.
* @note This macro is not meant to be used in the application code but
* only from within the kernel.
*/
#if !defined(PORT_OPTIMIZED_SETCURRP) || defined(__DOXYGEN__)
#if !defined(CH_CURRP_REGISTER_CACHE) || defined(__DOXYGEN__)
#define setcurrp(tp) (rlist.r_current = (tp))
#else /* defined(CH_CURRP_REGISTER_CACHE) */
(currp = (tp))
#endif /* defined(CH_CURRP_REGISTER_CACHE) */
#endif /* !defined(PORT_OPTIMIZED_SETCURRP) */
/* /*
* Scheduler APIs. * Scheduler APIs.
@ -135,7 +157,7 @@ extern "C" {
* @details This function returns @p TRUE if there is a ready thread with * @details This function returns @p TRUE if there is a ready thread with
* higher priority. * higher priority.
*/ */
#if !defined(PORT_OPTIMIZED_ISRESCHREQUIREDI) && !defined(__DOXYGEN__) #if !defined(PORT_OPTIMIZED_ISRESCHREQUIREDI) || defined(__DOXYGEN__)
#define chSchIsRescRequiredI() (firstprio(&rlist.r_queue) > currp->p_prio) #define chSchIsRescRequiredI() (firstprio(&rlist.r_queue) > currp->p_prio)
#endif /* !defined(PORT_OPTIMIZED_ISRESCHREQUIREDI) */ #endif /* !defined(PORT_OPTIMIZED_ISRESCHREQUIREDI) */
@ -144,7 +166,7 @@ extern "C" {
* @details This function returns @p TRUE if there is a ready thread with * @details This function returns @p TRUE if there is a ready thread with
* equal or higher priority. * equal or higher priority.
*/ */
#if !defined(PORT_OPTIMIZED_CANYIELDS) && !defined(__DOXYGEN__) #if !defined(PORT_OPTIMIZED_CANYIELDS) || defined(__DOXYGEN__)
#define chSchCanYieldS() (firstprio(&rlist.r_queue) >= currp->p_prio) #define chSchCanYieldS() (firstprio(&rlist.r_queue) >= currp->p_prio)
#endif /* !defined(PORT_OPTIMIZED_CANYIELDS) */ #endif /* !defined(PORT_OPTIMIZED_CANYIELDS) */

View File

@ -96,7 +96,8 @@ void chSchGoSleepS(tstate_t newstate) {
Thread *otp; Thread *otp;
(otp = currp)->p_state = newstate; (otp = currp)->p_state = newstate;
(currp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT; setcurrp(fifo_remove(&rlist.r_queue));
currp->p_state = THD_STATE_CURRENT;
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;
#endif #endif
@ -196,7 +197,8 @@ void chSchWakeupS(Thread *ntp, msg_t msg) {
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;
#endif #endif
(currp = ntp)->p_state = THD_STATE_CURRENT; setcurrp(ntp);
ntp->p_state = THD_STATE_CURRENT;
chDbgTrace(ntp, otp); chDbgTrace(ntp, otp);
chSysSwitchI(ntp, otp); chSysSwitchI(ntp, otp);
} }
@ -217,7 +219,8 @@ void chSchDoRescheduleI(void) {
#endif #endif
otp = currp; otp = currp;
/* Picks the first thread from the ready queue and makes it current.*/ /* Picks the first thread from the ready queue and makes it current.*/
(currp = ntp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT; (ntp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT;
setcurrp(ntp);
chSchReadyI(otp); chSchReadyI(otp);
chDbgTrace(ntp, otp); chDbgTrace(ntp, otp);
chSysSwitchI(ntp, otp); chSysSwitchI(ntp, otp);

View File

@ -80,7 +80,8 @@ void chSysInit(void) {
#endif #endif
/* Now this instructions flow becomes the main thread.*/ /* Now this instructions flow becomes the main thread.*/
(currp = init_thread(&mainthread, NORMALPRIO))->p_state = THD_STATE_CURRENT; setcurrp(init_thread(&mainthread, NORMALPRIO));
currp->p_state = THD_STATE_CURRENT;
chSysEnable(); chSysEnable();
/* This thread has the lowest priority in the system, its role is just to /* This thread has the lowest priority in the system, its role is just to

View File

@ -144,7 +144,7 @@ void SVCallVector(Thread *ntp, Thread *otp) {
__attribute__((naked)) __attribute__((naked))
#endif #endif
void PendSVVector(void) { void PendSVVector(void) {
Thread *otp; Thread *otp, *ntp;
register struct intctx *sp_thd asm("r12"); register struct intctx *sp_thd asm("r12");
chSysLockFromIsr(); chSysLockFromIsr();
@ -152,14 +152,16 @@ void PendSVVector(void) {
PUSH_CONTEXT(sp_thd); PUSH_CONTEXT(sp_thd);
(otp = currp)->p_ctx.r13 = sp_thd; (otp = currp)->p_ctx.r13 = sp_thd;
(currp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT; ntp = fifo_remove(&rlist.r_queue);
setcurrp(ntp);
ntp->p_state = THD_STATE_CURRENT;
chSchReadyI(otp); chSchReadyI(otp);
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0
/* Set the round-robin time quantum.*/ /* Set the round-robin time quantum.*/
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;
#endif #endif
chDbgTrace(otp, currp); chDbgTrace(ntp, otp);
sp_thd = currp->p_ctx.r13; sp_thd = ntp->p_ctx.r13;
POP_CONTEXT(sp_thd); POP_CONTEXT(sp_thd);
} }

View File

@ -87,6 +87,10 @@
- CHANGE: The module documentation has been moved from the kernel.dox file - CHANGE: The module documentation has been moved from the kernel.dox file
to the various source code files in order to make it easier to maintain to the various source code files in order to make it easier to maintain
and double as source comments. and double as source comments.
- CHANGE: Removed the support for the CH_CURRP_REGISTER_CACHE optimization
in the configuration files and in the scheduler header. It will be
reintroduced as an architecture-specific optimization using the new
capture mechanism (among other optimizations).
*** 1.5.3 *** *** 1.5.3 ***
- FIX: Removed C99-style variables declarations (bug 2964418)(backported - FIX: Removed C99-style variables declarations (bug 2964418)(backported

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS TRUE #define CH_USE_NESTED_LOCKS TRUE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK TRUE #define CH_DBG_ENABLE_STACK_CHECK TRUE

View File

@ -20,7 +20,11 @@
/** /**
* @file templates/chconf.h * @file templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config * @addtogroup config
* @details Kernel related settings and hooks.
* @{ * @{
*/ */
@ -44,10 +48,12 @@
* @brief Round robin interval. * @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the * @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero * threads before preemption occurs. Setting this value to zero
* disables the round robin mechanism. * disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* *
* @note Disabling round robin makes the kernel more compact and generally * @note Disabling the round robin preemption makes the kernel more compact
* faster but forbids multiple threads at the same priority level. * and generally faster.
*/ */
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) #if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20 #define CH_TIME_QUANTUM 20
@ -62,7 +68,7 @@
* You may use this option if you need to merge ChibiOS/RT with * You may use this option if you need to merge ChibiOS/RT with
* external libraries that require nested lock/unlock operations. * external libraries that require nested lock/unlock operations.
* *
* @note The default is @p FALSE. * @note T he default is @p FALSE.
*/ */
#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) #if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__)
#define CH_USE_NESTED_LOCKS FALSE #define CH_USE_NESTED_LOCKS FALSE
@ -168,7 +174,7 @@
/** /**
* @brief Atomic semaphore API. * @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemWaitSignal() API * @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel. * is included in the kernel.
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
@ -337,6 +343,7 @@
* *
* @note The default is @p TRUE. * @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT. * @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/ */
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) #if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE #define CH_USE_DYNAMIC TRUE
@ -385,8 +392,10 @@
* @details If enabled then a runtime stack check is performed. * @details If enabled then a runtime stack check is performed.
* *
* @note The default is @p FALSE. * @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way. It * @note The stack check is performed in a architecture/port dependent way.
* may not be implemented or some ports. * It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/ */
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE #define CH_DBG_ENABLE_STACK_CHECK FALSE