From 902470d1c542735b989a727355744a974af43de4 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 25 Oct 2008 09:34:25 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@481 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-GCC/chconf.h | 18 ++------------- demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h | 21 +++-------------- demos/ARM7-LPC214x-G++/chconf.h | 21 +++-------------- demos/ARM7-LPC214x-GCC-minimal/chconf.h | 21 +++-------------- demos/ARM7-LPC214x-GCC/chconf.h | 21 +++-------------- demos/ARMCM3-STM32F103-GCC/chconf.h | 21 +++-------------- demos/AVR-AT90CANx-GCC/chconf.h | 21 +++-------------- demos/AVR-ATmega128-GCC/chconf.h | 21 +++-------------- demos/MSP430-MSP430x1611-GCC/chconf.h | 17 +++----------- demos/Win32-MinGW/chconf.h | 21 +++-------------- docs/Doxyfile | 5 ++--- docs/ch.txt | 9 ++------ readme.txt | 4 ++++ src/chdebug.c | 4 ---- src/chdelta.c | 3 +-- src/chinit.c | 9 +------- src/chqueues.c | 16 ++++++------- src/chschd.c | 5 ----- src/chsleep.c | 2 -- src/include/delta.h | 40 ++++++++++++++++----------------- src/include/scheduler.h | 3 --- src/include/sleep.h | 12 ++-------- src/templates/chconf.h | 17 +++----------- 23 files changed, 71 insertions(+), 261 deletions(-) diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h index f6f40d5e3..7bf6e138e 100644 --- a/demos/ARM7-AT91SAM7X-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -86,8 +73,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h index a5b956523..45202074e 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h index b307e8a52..ea0e068c6 100644 --- a/demos/ARM7-LPC214x-G++/chconf.h +++ b/demos/ARM7-LPC214x-G++/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/ARM7-LPC214x-GCC-minimal/chconf.h b/demos/ARM7-LPC214x-GCC-minimal/chconf.h index ade1aa207..543edbea2 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/chconf.h +++ b/demos/ARM7-LPC214x-GCC-minimal/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ //#define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ //#define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ //#define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ //#define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ //#define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index a5b956523..45202074e 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/ARMCM3-STM32F103-GCC/chconf.h b/demos/ARMCM3-STM32F103-GCC/chconf.h index a5b956523..45202074e 100644 --- a/demos/ARMCM3-STM32F103-GCC/chconf.h +++ b/demos/ARMCM3-STM32F103-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index ea26be7ad..8408f6f22 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h index 34b26c7be..6ec07fca9 100644 --- a/demos/AVR-ATmega128-GCC/chconf.h +++ b/demos/AVR-ATmega128-GCC/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for LPC214x-GCC demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index c78c97701..fb6203d46 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -35,18 +35,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -61,8 +53,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -75,8 +66,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -85,8 +75,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index 46272d552..f33f54930 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -17,10 +17,6 @@ along with this program. If not, see . */ -/* - * Configuration file for MingGW32 demo project. - */ - /** * @addtogroup Config * @{ @@ -34,18 +30,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority. */ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -60,8 +48,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -74,8 +61,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -84,8 +70,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve diff --git a/docs/Doxyfile b/docs/Doxyfile index e8f1138c3..1b95ba06c 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -249,8 +249,6 @@ INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = __JUST_STUBS__ \ __DOXIGEN__ \ - CH_USE_VIRTUAL_TIMERS \ - CH_USE_SYSTEMTIME \ CH_USE_WAITEXIT \ CH_USE_SEMAPHORES \ CH_USE_SEMSW \ @@ -271,7 +269,8 @@ PREDEFINED = __JUST_STUBS__ \ CH_USE_MESSAGES_PRIORITY \ CH_USE_DEBUG \ CH_USE_TRACE \ - CH_USE_DYNAMIC + CH_USE_DYNAMIC \ + CH_USE_ROUNDROBIN EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- diff --git a/docs/ch.txt b/docs/ch.txt index de2db1c6f..2186de365 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -351,8 +351,6 @@ * @defgroup VirtualTimers Virtual Timers * @{ * Virtual Timers APIs. - * In order to use the Virtual Timers the \p CH_USE_VIRTUAL_TIMERS option - * must be specified in \p chconf.h. * @file src/chdelta.c Virtual Timers code. * @file delta.h Virtual Timers macros and structures. */ @@ -362,8 +360,6 @@ * @defgroup Time Time * @{ * Time related APIs. - * In order to use the Time APIs the \p CH_USE_SLEEP - * option must be specified in \p chconf.h. * @file include/sleep.h Time macros and structures. * @file chsleep.c Time functions. */ @@ -503,9 +499,8 @@ * server threads but just a pointer passed so the exchange is very time * efficient.
* Messages are usually processed in FIFO order but it is possible to process - * them in priority order by specifying \p P_MSGBYPRIO when creating a server - * thread, \p CH_USE_MESSAGES_PRIORITY must also be specified in \p chconf.h - * in order to enable the feature.
+ * them in priority order by specifying CH_USE_MESSAGES_PRIORITY + * in \p chconf.h.
* Threads do not need to allocate space for message queues, the mechanism * just requires two extra pointers in the \p Thread structure (the message * queue header).
diff --git a/readme.txt b/readme.txt index 14d26a3f2..3494707a5 100644 --- a/readme.txt +++ b/readme.txt @@ -74,11 +74,15 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, ***************************************************************************** *** 0.7.3 *** +- CHANGE: Removed the CH_USE_SYSTEMTIME and CH_USE_VIRTUAL_TIMER configuration + options in order to make the chconf.h file simpler. The related subsystems + are almost always required and are now always included. - Small optimization to the MSP430 serial driver. - Added dependency informations handling to the MSP430 demo Makefile. - Removed the performance spreadsheet (it was *very* old) and added a directory containing the test reports ./docs/reports. Each report shows the results from the latest test run on each target. +- Small fixes in the documentation. *** 0.7.2 *** - NEW: Added a serial driver to the MSP430 port, the MSP430 port now has been diff --git a/src/chdebug.c b/src/chdebug.c index a826776fe..56edd2a0d 100644 --- a/src/chdebug.c +++ b/src/chdebug.c @@ -60,11 +60,7 @@ TraceBuffer dbgtb; void chDbgTrace(Thread *otp, Thread *ntp) { dbgtb.tb_ptr->cse_wtobjp = otp->p_wtobjp; -#ifdef CH_USE_SYSTEMTIME dbgtb.tb_ptr->cse_time = chSysGetTime(); -#else - dbgtb.tb_ptr->cse_time = 0; -#endif dbgtb.tb_ptr->cse_state = otp->p_state; dbgtb.tb_ptr->cse_tid = ntp->p_tid; if (++dbgtb.tb_ptr >= &dbgtb.tb_buffer[TRACE_BUFFER_SIZE]) diff --git a/src/chdelta.c b/src/chdelta.c index 62f3b35cc..ec654907c 100644 --- a/src/chdelta.c +++ b/src/chdelta.c @@ -24,7 +24,6 @@ #include -#ifdef CH_USE_VIRTUAL_TIMERS DeltaList dlist; /** @@ -35,6 +34,7 @@ void chVTInit(void) { dlist.dl_next = dlist.dl_prev = (void *)&dlist; dlist.dl_dtime = (systime_t)-1; + dlist.dl_stime = 0; } /** @@ -86,6 +86,5 @@ void chVTResetI(VirtualTimer *vtp) { vtp->vt_next->vt_prev = vtp->vt_prev; vtp->vt_func = 0; } -#endif /* CH_USE_VIRTUAL_TIMER */ /** @} */ diff --git a/src/chinit.c b/src/chinit.c index 5d46808d8..d93ac1581 100644 --- a/src/chinit.c +++ b/src/chinit.c @@ -37,9 +37,7 @@ void chSysInit(void) { chSchInit(); chDbgInit(); -#ifdef CH_USE_VIRTUAL_TIMERS chVTInit(); -#endif #ifdef CH_USE_HEAP chHeapInit(); #endif @@ -69,19 +67,14 @@ void chSysInit(void) { * together with the \p CH_TIME_QUANTUM macro, the round robin interval. */ void chSysTimerHandlerI(void) { + #ifdef CH_USE_ROUNDROBIN /* running thread has not used up quantum yet? */ if (rlist.r_preempt > 0) /* decrement remaining quantum */ rlist.r_preempt--; #endif -#ifdef CH_USE_SYSTEMTIME - rlist.r_stime++; -#endif - -#ifdef CH_USE_VIRTUAL_TIMERS chVTDoTickI(); -#endif } /** @} */ diff --git a/src/chqueues.c b/src/chqueues.c index ed9eb840c..30e71a055 100644 --- a/src/chqueues.c +++ b/src/chqueues.c @@ -108,7 +108,7 @@ msg_t chIQGet(Queue *qp) { return b; } -#ifdef CH_USE_QUEUES_TIMEOUT +#if defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) /** * Gets a byte from the input queue, if the queue is empty then the * calling thread is suspended until a byte arrives in the queue or the @@ -118,8 +118,8 @@ msg_t chIQGet(Queue *qp) { * @return A byte value from the queue. * @retval Q_TIMEOUT if the specified time expired. * @retval Q_RESET if the queue was reset. - * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT - * option is enabled in \p chconf.h. + * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT and + * \p CH_USE_SEMAPHORES_TIMEOUT options are enabled in \p chconf.h. */ msg_t chIQGetTimeout(Queue *qp, systime_t time) { uint8_t b; @@ -142,7 +142,7 @@ msg_t chIQGetTimeout(Queue *qp, systime_t time) { chSysUnlock(); return b; } -#endif /* CH_USE_QUEUES_TIMEOUTS */ +#endif /* defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) */ /** * Reads some data from the input queue into the specified buffer. The function @@ -358,7 +358,7 @@ msg_t chHDQGetReceive(HalfDuplexQueue *qp) { return b; } -#ifdef CH_USE_QUEUES_TIMEOUT +#if defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) /** * Reads a byte from the receive queue, if the queue is empty or is in * transmission mode then the invoking thread is suspended. @@ -366,8 +366,8 @@ msg_t chHDQGetReceive(HalfDuplexQueue *qp) { * @param time the number of ticks before the operation timouts * @return The byte value. * @retval Q_TIMEOUT if a timeout occurs. - * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT - * option is enabled in \p chconf.h. + * @note The function is available only if the \p CH_USE_QUEUES_TIMEOUT and + * \p CH_USE_SEMAPHORES_TIMEOUT options are enabled in \p chconf.h. */ msg_t chHDQGetReceiveTimeout(HalfDuplexQueue *qp, systime_t time) { uint8_t b; @@ -394,7 +394,7 @@ msg_t chHDQGetReceiveTimeout(HalfDuplexQueue *qp, systime_t time) { chSysUnlock(); return b; } -#endif +#endif /* defined(CH_USE_QUEUES_TIMEOUT) && defined(CH_USE_SEMAPHORES_TIMEOUT) */ /** * Writes a byte into the transmit queue. If the buffer contains unread diff --git a/src/chschd.c b/src/chschd.c index 2ac2a9e1d..b6fd624e0 100644 --- a/src/chschd.c +++ b/src/chschd.c @@ -39,9 +39,6 @@ void chSchInit(void) { #ifdef CH_USE_ROUNDROBIN rlist.r_preempt = CH_TIME_QUANTUM; #endif -#ifdef CH_USE_SYSTEMTIME - rlist.r_stime = 0; -#endif } /** @@ -94,7 +91,6 @@ void chSchGoSleepS(tstate_t newstate) { chSysSwitchI(otp, currp); } -#ifdef CH_USE_VIRTUAL_TIMERS /* * Timeout wakeup callback. */ @@ -130,7 +126,6 @@ msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) { chVTResetI(&vt); return currp->p_rdymsg; } -#endif /* CH_USE_VIRTUAL_TIMERS */ /** * Wakes up a thread. diff --git a/src/chsleep.c b/src/chsleep.c index 1fc686120..7bf805471 100644 --- a/src/chsleep.c +++ b/src/chsleep.c @@ -35,7 +35,6 @@ void chThdSleep(systime_t time) { chSysUnlock(); } -#ifdef CH_USE_SYSTEMTIME /** * Checks if the current system time is within the specified time window. * @param start the start of the time window (inclusive) @@ -47,6 +46,5 @@ bool_t chSysInTimeWindow(systime_t start, systime_t end) { return end >= start ? (time >= start) && (time < end) : (time >= start) || (time < end); } -#endif /* CH_USE_SYSTEMTIME */ /** @} */ diff --git a/src/include/delta.h b/src/include/delta.h index 4d59c1a73..4d1c9ac23 100644 --- a/src/include/delta.h +++ b/src/include/delta.h @@ -25,8 +25,6 @@ #ifndef _DELTA_H_ #define _DELTA_H_ -#ifdef CH_USE_VIRTUAL_TIMERS - /** Virtual Timer callback function.*/ typedef void (*vtfunc_t)(void *); @@ -37,17 +35,17 @@ typedef struct VirtualTimer VirtualTimer; * @extends DeltaList */ struct VirtualTimer { - /** Next timer in the delta list.*/ - VirtualTimer *vt_next; - /** Previous timer in the delta list.*/ - VirtualTimer *vt_prev; - /** Time delta before timeout.*/ - systime_t vt_dtime; - /** Timer callback function pointer. The pointer is reset to zero after - the callback is invoked.*/ - vtfunc_t vt_func; - /** Timer callback function parameter.*/ - void *vt_par; + /** Next timer in the delta list.*/ + VirtualTimer *vt_next; + /** Previous timer in the delta list.*/ + VirtualTimer *vt_prev; + /** Time delta before timeout.*/ + systime_t vt_dtime; + /** Timer callback function pointer. The pointer is reset to zero after + the callback is invoked.*/ + vtfunc_t vt_func; + /** Timer callback function parameter.*/ + void *vt_par; }; /** @@ -57,17 +55,19 @@ struct VirtualTimer { * is often used in the code. */ typedef struct { - /** Next timer in the list (the one that will be triggered next).*/ - VirtualTimer *dl_next; - /** Last timer in the list.*/ - VirtualTimer *dl_prev; - /** Not used but it must be set to -1.*/ - systime_t dl_dtime; + /** Next timer in the list (the one that will be triggered next).*/ + VirtualTimer *dl_next; + /** Last timer in the list.*/ + VirtualTimer *dl_prev; + /** Not used but it must be set to -1.*/ + systime_t dl_dtime; + volatile systime_t dl_stime; } DeltaList; extern DeltaList dlist; #define chVTDoTickI() { \ + dlist.dl_stime++; \ if (&dlist != (DeltaList *)dlist.dl_next) { \ VirtualTimer *vtp; \ \ @@ -100,8 +100,6 @@ extern "C" { /** Returns TRUE if the speciified timer is armed.*/ #define chVTIsArmedI(vtp) ((vtp)->vt_func != NULL) -#endif /* CH_USE_VIRTUAL_TIMER */ - #endif /* _DELTA_H_ */ /** @} */ diff --git a/src/include/scheduler.h b/src/include/scheduler.h index 362dd9d31..3f9eb7a39 100644 --- a/src/include/scheduler.h +++ b/src/include/scheduler.h @@ -48,9 +48,6 @@ typedef struct { /** the currently running thread */ Thread *r_current; #endif -#ifdef CH_USE_SYSTEMTIME - volatile systime_t r_stime; -#endif } ReadyList; extern ReadyList rlist; diff --git a/src/include/sleep.h b/src/include/sleep.h index 109d9d072..faed26109 100644 --- a/src/include/sleep.h +++ b/src/include/sleep.h @@ -46,29 +46,22 @@ extern "C" { #endif void chThdSleep(systime_t time); -#ifdef CH_USE_SYSTEMTIME -bool_t chSysInTimeWindow(systime_t start, systime_t end); -#endif /* CH_USE_SYSTEMTIME */ + bool_t chSysInTimeWindow(systime_t start, systime_t end); #ifdef __cplusplus } #endif -#ifdef CH_USE_SYSTEMTIME /** * Returns the number of system ticks since the \p chSysInit() invocation. * @return the system ticks number * @note The counter can reach its maximum and then returns to zero. * @note This function is designed to work with the \p chThdSleepUntil(). - * @note The function is available only if the \p CH_USE_SYSTEMTIME - * option is enabled in \p chconf.h. */ -#define chSysGetTime() rlist.r_stime +#define chSysGetTime() dlist.dl_stime /** * Suspends the invoking thread until the system time arrives to the specified * value. - * @note The function is available only if the \p CH_USE_SYSTEMTIME - * option is enabled in \p chconf.h. */ #define chThdSleepUntil(t) { \ chSysLock(); \ @@ -76,7 +69,6 @@ bool_t chSysInTimeWindow(systime_t start, systime_t end); (systime_t)((t) - chSysGetTime())); \ chSysUnlock(); \ } -#endif /* CH_USE_SYSTEMTIME */ #endif /* _SLEEP_H_ */ diff --git a/src/templates/chconf.h b/src/templates/chconf.h index 37569772e..5a16800bc 100644 --- a/src/templates/chconf.h +++ b/src/templates/chconf.h @@ -35,18 +35,10 @@ * that this is not related to the compiler optimization options.*/ #define CH_OPTIMIZE_SPEED -/** Configuration option: if specified then the Virtual Timers subsystem is - * included in the kernel.*/ -#define CH_USE_VIRTUAL_TIMERS - /** Configuration option: if specified then the kernel performs the round * robin scheduling algorithm on threads of equal priority.*/ #define CH_USE_ROUNDROBIN -/** Configuration option: if specified then the System Timer subsystem is - * included in the kernel.*/ -#define CH_USE_SYSTEMTIME - /** Configuration option: if specified then the \p chThdWait() function * is included in the kernel.*/ #define CH_USE_WAITEXIT @@ -61,8 +53,7 @@ /** Configuration option: if specified then the Semaphores with timeout APIs * are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_SEMAPHORES.*/ #define CH_USE_SEMAPHORES_TIMEOUT /** Configuration option: if specified then the Mutexes APIs are included in @@ -75,8 +66,7 @@ /** Configuration option: if specified then the \p chEvtWaitTimeout() * function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_EVENTS.*/ #define CH_USE_EVENTS_TIMEOUT /** Configuration option: if specified then the Synchronous Messages APIs are @@ -85,8 +75,7 @@ /** Configuration option: if specified then the \p chMsgSendWithEvent() * function is included in the kernel. - * @note requires \p CH_USE_MESSAGES. - * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ + * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT /** Configuration option: If enabled then the threads have an option to serve -- cgit v1.2.3