From ac6b3caba1b75ca603e63946f8ca7f54c7ab598f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 26 Aug 2008 10:38:29 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@407 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-GCC/chconf.h | 8 ++++++++ demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h | 8 ++++++++ demos/ARM7-LPC214x-G++/chconf.h | 8 ++++++++ demos/ARM7-LPC214x-GCC-minimal/chconf.h | 8 ++++++++ demos/ARM7-LPC214x-GCC/chconf.h | 8 ++++++++ demos/ARMCM3-STM32F103-GCC/chconf.h | 8 ++++++++ demos/AVR-AT90CANx-GCC/chconf.h | 8 ++++++++ demos/AVR-ATmega128-GCC/chconf.h | 8 ++++++++ demos/MSP430-MSP430x1611-GCC/chconf.h | 8 ++++++++ demos/Win32-MinGW/chconf.h | 8 ++++++++ demos/Win32-MinGW/chtypes.h | 1 + docs/Doxyfile | 2 +- docs/index.html | 2 +- ports/ARM7/chtypes.h | 1 + ports/ARMCM3/chtypes.h | 1 + ports/AVR/chtypes.h | 1 + ports/MSP430/chtypes.h | 1 + readme.txt | 9 +++++++++ src/include/ch.h | 1 + src/kernel.mk | 2 +- 20 files changed, 98 insertions(+), 3 deletions(-) diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h index 8db71b445..b66e8f595 100644 --- a/demos/ARM7-AT91SAM7X-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h index 8db71b445..b66e8f595 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h index 8db71b445..b66e8f595 100644 --- a/demos/ARM7-LPC214x-G++/chconf.h +++ b/demos/ARM7-LPC214x-G++/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/ARM7-LPC214x-GCC-minimal/chconf.h b/demos/ARM7-LPC214x-GCC-minimal/chconf.h index 9f903df06..cfa407fc5 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/chconf.h +++ b/demos/ARM7-LPC214x-GCC-minimal/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ //#define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +//#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +//#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index 8db71b445..b66e8f595 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/ARMCM3-STM32F103-GCC/chconf.h b/demos/ARMCM3-STM32F103-GCC/chconf.h index 8db71b445..b66e8f595 100644 --- a/demos/ARMCM3-STM32F103-GCC/chconf.h +++ b/demos/ARMCM3-STM32F103-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index fca0159a2..182ba1a9b 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h index fca0159a2..182ba1a9b 100644 --- a/demos/AVR-ATmega128-GCC/chconf.h +++ b/demos/AVR-ATmega128-GCC/chconf.h @@ -137,6 +137,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index 7e29d314e..336c0d6b0 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -138,6 +138,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index b17295c65..674d747c1 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -142,6 +142,14 @@ * are included in the kernel.*/ #define CH_USE_SERIAL_HALFDUPLEX +/** Configuration option: if specified then the memory pools allocator APIs + * are included in the kernel.*/ +#define CH_USE_MEMPOOLS + +/** Configuration option: if specified then the memory pools allocator + provides an implementation of the sbrk() function.*/ +#define CH_MEMPOOLS_PROVIDE_SBRK + /** Configuration option: Frequency of the system timer that drives the system * ticks. This also defines the system time unit.*/ #define CH_FREQUENCY 1000 diff --git a/demos/Win32-MinGW/chtypes.h b/demos/Win32-MinGW/chtypes.h index 0b74459bc..6f8662bd9 100644 --- a/demos/Win32-MinGW/chtypes.h +++ b/demos/Win32-MinGW/chtypes.h @@ -22,6 +22,7 @@ #define __need_NULL #define __need_size_t +#define __need_ptrdiff_t #include #if !defined(_STDINT_H) && !defined(__STDINT_H_) diff --git a/docs/Doxyfile b/docs/Doxyfile index 9fa74ba80..7f4432c52 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = ChibiOS/RT -PROJECT_NUMBER = "0.6.10 beta" +PROJECT_NUMBER = "0.7.0 beta" OUTPUT_DIRECTORY = . CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff --git a/docs/index.html b/docs/index.html index bee25b525..232949a08 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,7 +12,7 @@ Current -Version 0.6.10
+Version 0.7.0
-
Project on SourceForge
Documentation
diff --git a/ports/ARM7/chtypes.h b/ports/ARM7/chtypes.h index 21ee1c045..ab0dc36c8 100644 --- a/ports/ARM7/chtypes.h +++ b/ports/ARM7/chtypes.h @@ -22,6 +22,7 @@ #define __need_NULL #define __need_size_t +#define __need_ptrdiff_t #include #if !defined(_STDINT_H) && !defined(__STDINT_H_) diff --git a/ports/ARMCM3/chtypes.h b/ports/ARMCM3/chtypes.h index 21ee1c045..ab0dc36c8 100644 --- a/ports/ARMCM3/chtypes.h +++ b/ports/ARMCM3/chtypes.h @@ -22,6 +22,7 @@ #define __need_NULL #define __need_size_t +#define __need_ptrdiff_t #include #if !defined(_STDINT_H) && !defined(__STDINT_H_) diff --git a/ports/AVR/chtypes.h b/ports/AVR/chtypes.h index 6e08d93f1..2cd9c681c 100644 --- a/ports/AVR/chtypes.h +++ b/ports/AVR/chtypes.h @@ -22,6 +22,7 @@ #define __need_NULL #define __need_size_t +#define __need_ptrdiff_t #include #if !defined(_STDINT_H) && !defined(__STDINT_H_) diff --git a/ports/MSP430/chtypes.h b/ports/MSP430/chtypes.h index 319b9714e..1b7f3704b 100644 --- a/ports/MSP430/chtypes.h +++ b/ports/MSP430/chtypes.h @@ -27,6 +27,7 @@ #define __need_NULL #define __need_size_t +#define __need_ptrdiff_t #include #if !defined(_STDINT_H) && !defined(__STDINT_H_) diff --git a/readme.txt b/readme.txt index eab4a2cba..a751fe1b0 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,15 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** Releases *** ***************************************************************************** +*** 0.7.0 *** +- NEW: Memory Pools functionality added, this mechanism allows constant-time + allocation/freeing of constant size objects. It can be used to dynamically + allocate kernel objects like Semaphores, Mutexes, Threads etc it can also + handle application-defined objects. The allocator is, of course, thread-safe. +- NEW: Kernel-provided sbrk() function, it is used internally by the Memory + Pools but can also be used by the C runtime. There is also an option to + meke the Memory Pools use an user-provided sbrk() function. + *** 0.6.10 *** - FIX: Fixed a case-sensitiveness error in lpc214x_ssp.c, it affected only linux/unix users. diff --git a/src/include/ch.h b/src/include/ch.h index cafcf2f75..e88435db8 100644 --- a/src/include/ch.h +++ b/src/include/ch.h @@ -42,6 +42,7 @@ #include "sleep.h" #include "queues.h" #include "serial.h" +#include "pools.h" #include "debug.h" /* diff --git a/src/kernel.mk b/src/kernel.mk index 54a9cffdd..febd8fa9c 100644 --- a/src/kernel.mk +++ b/src/kernel.mk @@ -6,4 +6,4 @@ KERNSRC = ../../src/chinit.c ../../src/chdebug.c \ ../../src/chsem.c ../../src/chmtx.c \ ../../src/chevents.c ../../src/chmsg.c \ ../../src/chsleep.c ../../src/chqueues.c \ - ../../src/chserial.c + ../../src/chserial.c ../../src/chpools.c -- cgit v1.2.3