From 430010715e7a9af17185412273165674f3b58f20 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 16 Dec 2007 19:01:30 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@141 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-GCC-minimal/Makefile | 5 +- demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb | 5 +- demos/ARM7-LPC214x-GCC-minimal/chconf.h | 7 +- demos/ARM7-LPC214x-GCC/Makefile | 5 +- demos/ARM7-LPC214x-GCC/Makefile.thumb | 5 +- demos/ARM7-LPC214x-GCC/chconf.h | 7 +- demos/AVR-AT90CANx-GCC/chconf.h | 7 +- demos/Win32-MSVS/chconf.h | 7 +- demos/Win32-MinGW/chconf.h | 7 +- docs/Doxyfile | 4 +- docs/ch.txt | 73 +++-- docs/index.html | 2 +- readme.txt | 12 + src/chmtx.c | 249 ++++++++++++++++++ src/chsem.c | 129 --------- src/chthreads.c | 14 +- src/include/ch.h | 4 + src/include/mutexes.h | 66 +++++ src/include/semaphores.h | 9 +- src/include/threads.h | 26 +- src/templates/chconf.h | 7 +- test/test.c | 238 ++++++++++++----- 22 files changed, 618 insertions(+), 270 deletions(-) create mode 100644 src/chmtx.c create mode 100644 src/include/mutexes.h diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile b/demos/ARM7-LPC214x-GCC-minimal/Makefile index e74d2f382..ac7bb1000 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile @@ -64,8 +64,9 @@ UADEFS = # List ARM-mode C source files here ASRC = chcore.c \ ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \ - ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c \ - ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c \ + ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \ + ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \ + ../../src/chserial.c \ ../../ports/ARM7-LPC214x/GCC/vic.c \ main.c diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb b/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb index 68f308449..17239c741 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb @@ -69,8 +69,9 @@ ASRC = # enabled for all modules and that lowers performance. TSRC = chcore.c \ ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \ - ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c \ - ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c \ + ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \ + ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \ + ../../src/chserial.c \ ../../ports/ARM7-LPC214x/GCC/vic.c \ main.c diff --git a/demos/ARM7-LPC214x-GCC-minimal/chconf.h b/demos/ARM7-LPC214x-GCC-minimal/chconf.h index fc81d571f..11081acc4 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/chconf.h +++ b/demos/ARM7-LPC214x-GCC-minimal/chconf.h @@ -77,10 +77,9 @@ * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ //#define CH_USE_SEMAPHORES_TIMEOUT -/** Configuration option: if specified then the Semaphores APIs with priority - * shift are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES.*/ -//#define CH_USE_RT_SEMAPHORES +/** Configuration option: if specified then the Mutexes APIs are included in + * the kernel.*/ +//#define CH_USE_MUTEXES /** Configuration option: if specified then the Events APIs are included in * the kernel.*/ diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 60c2df008..a2f229617 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -64,8 +64,9 @@ UADEFS = # List ARM-mode C source files here ASRC = chcore.c \ ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \ - ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c \ - ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c \ + ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \ + ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \ + ../../src/chserial.c \ ../../ports/ARM7-LPC214x/GCC/vic.c ../../ports/ARM7-LPC214x/GCC/lpc214x_serial.c \ ../../ports/ARM7-LPC214x/GCC/lpc214x_ssp.c \ ../../src/lib/evtimer.c ../../test/test.c \ diff --git a/demos/ARM7-LPC214x-GCC/Makefile.thumb b/demos/ARM7-LPC214x-GCC/Makefile.thumb index 111fa8c7b..518169cd8 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile.thumb +++ b/demos/ARM7-LPC214x-GCC/Makefile.thumb @@ -69,8 +69,9 @@ ASRC = # enabled for all modules and that lowers performance. TSRC = chcore.c \ ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \ - ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chevents.c \ - ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c ../../src/chserial.c \ + ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \ + ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \ + ../../src/chserial.c \ ../../ports/ARM7-LPC214x/GCC/vic.c ../../ports/ARM7-LPC214x/GCC/lpc214x_serial.c \ ../../ports/ARM7-LPC214x/GCC/lpc214x_ssp.c \ ../../src/lib/evtimer.c ../../test/test.c \ diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index 87402547c..28db4b351 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -77,10 +77,9 @@ * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ #define CH_USE_SEMAPHORES_TIMEOUT -/** Configuration option: if specified then the Semaphores APIs with priority - * shift are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES.*/ -#define CH_USE_RT_SEMAPHORES +/** Configuration option: if specified then the Mutexes APIs are included in + * the kernel.*/ +#define CH_USE_MUTEXES /** Configuration option: if specified then the Events APIs are included in * the kernel.*/ diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index 2bc89dc2f..b4ddeeb05 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -78,10 +78,9 @@ * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ #define CH_USE_SEMAPHORES_TIMEOUT -/** Configuration option: if specified then the Semaphores APIs with priority - * shift are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES.*/ -#define CH_USE_RT_SEMAPHORES +/** Configuration option: if specified then the Mutexes APIs are included in + * the kernel.*/ +#define CH_USE_MUTEXES /** Configuration option: if specified then the Events APIs are included in * the kernel.*/ diff --git a/demos/Win32-MSVS/chconf.h b/demos/Win32-MSVS/chconf.h index 5941cc856..037e3d8a0 100644 --- a/demos/Win32-MSVS/chconf.h +++ b/demos/Win32-MSVS/chconf.h @@ -82,10 +82,9 @@ * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ #define CH_USE_SEMAPHORES_TIMEOUT -/** Configuration option: if specified then the Semaphores APIs with priority - * shift are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES.*/ -#define CH_USE_RT_SEMAPHORES +/** Configuration option: if specified then the Mutexes APIs are included in + * the kernel.*/ +#define CH_USE_MUTEXES /** Configuration option: if specified then the Events APIs are included in * the kernel.*/ diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index af19dd995..3e741bb8c 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -82,10 +82,9 @@ * @note requires \p CH_USE_VIRTUAL_TIMERS.*/ #define CH_USE_SEMAPHORES_TIMEOUT -/** Configuration option: if specified then the Semaphores APIs with priority - * shift are included in the kernel. - * @note requires \p CH_USE_SEMAPHORES.*/ -#define CH_USE_RT_SEMAPHORES +/** Configuration option: if specified then the Mutexes APIs are included in + * the kernel.*/ +#define CH_USE_MUTEXES /** Configuration option: if specified then the Events APIs are included in * the kernel.*/ diff --git a/docs/Doxyfile b/docs/Doxyfile index 8abfd62b4..24ab33ea9 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -4,7 +4,7 @@ # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = ChibiOS/RT -PROJECT_NUMBER = "0.4.5 beta" +PROJECT_NUMBER = "0.5.0 beta" OUTPUT_DIRECTORY = . CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English @@ -231,7 +231,7 @@ PREDEFINED = __JUST_STUBS__ \ CH_USE_TERMINATE \ CH_USE_WAITEXIT \ CH_USE_SEMAPHORES \ - CH_USE_RT_SEMAPHORES \ + CH_USE_MUTEXES \ CH_USE_EVENTS \ CH_USE_EVENTS_TIMEOUT \ CH_USE_EXIT_EVENT \ diff --git a/docs/ch.txt b/docs/ch.txt index 02152047b..993f77102 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -13,7 +13,7 @@ *
  • Easily portable.
  • *
  • Mixed programming model:
  • *