diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-09-06 08:56:34 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-09-06 08:56:34 +0000 |
commit | 15ee17c8740a378cffcae681421b9e28fcde3d4c (patch) | |
tree | d5af4d9abff327bc5c05ec2b5ba56a6668aacf28 | |
parent | 517440bad9d6d2f27689e4e3de72794d869d2c26 (diff) | |
download | ChibiOS-15ee17c8740a378cffcae681421b9e28fcde3d4c.tar.gz ChibiOS-15ee17c8740a378cffcae681421b9e28fcde3d4c.tar.bz2 ChibiOS-15ee17c8740a378cffcae681421b9e28fcde3d4c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@426 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/ARM7-AT91SAM7X-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/chconf.h | 3 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/chconf.h | 1 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/chconf.h | 5 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/AVR-ATmega128-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/chconf.h | 3 | ||||
-rw-r--r-- | demos/Win32-MinGW/chconf.h | 1 | ||||
-rw-r--r-- | docs/Doxyfile | 1 | ||||
-rw-r--r-- | readme.txt | 7 | ||||
-rw-r--r-- | src/chheap.c | 6 | ||||
-rw-r--r-- | src/chmsg.c | 10 | ||||
-rw-r--r-- | src/chmtx.c | 5 | ||||
-rw-r--r-- | src/include/threads.h | 5 | ||||
-rw-r--r-- | src/templates/chconf.h | 3 |
17 files changed, 37 insertions, 28 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h index 57cc9d013..181dde8f4 100644 --- a/demos/ARM7-AT91SAM7X-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h index 57cc9d013..181dde8f4 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h index 292074816..8ac22dec5 100644 --- a/demos/ARM7-LPC214x-G++/chconf.h +++ b/demos/ARM7-LPC214x-G++/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/ARM7-LPC214x-GCC-minimal/chconf.h b/demos/ARM7-LPC214x-GCC-minimal/chconf.h index 206272504..fbd6f7d0e 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/chconf.h +++ b/demos/ARM7-LPC214x-GCC-minimal/chconf.h @@ -102,6 +102,7 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
//#define CH_USE_EXIT_EVENT
diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index 57cc9d013..181dde8f4 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/ARMCM3-STM32F103-GCC/chconf.h b/demos/ARMCM3-STM32F103-GCC/chconf.h index 57cc9d013..c5f1cbb90 100644 --- a/demos/ARMCM3-STM32F103-GCC/chconf.h +++ b/demos/ARMCM3-STM32F103-GCC/chconf.h @@ -98,13 +98,14 @@ /** Configuration option: If enabled then the threads have an option to serve
* messages by priority instead of FIFO order.
* @note requires \p CH_USE_MESSAGES.*/
-//#define CH_USE_MESSAGES_PRIORITY
+#define CH_USE_MESSAGES_PRIORITY
/** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index eca46b974..1d9f2acff 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h index c44cd39d5..736c4064e 100644 --- a/demos/AVR-ATmega128-GCC/chconf.h +++ b/demos/AVR-ATmega128-GCC/chconf.h @@ -102,9 +102,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index 0d1773a6a..feb1a78ab 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -103,9 +103,10 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
-#define CH_USE_EXIT_EVENT
+//#define CH_USE_EXIT_EVENT
/** Configuration option: if specified then the I/O queues APIs are included
* in the kernel.*/
diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index 71a2cf36e..b52281cfa 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -102,6 +102,7 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
#define CH_USE_EXIT_EVENT
diff --git a/docs/Doxyfile b/docs/Doxyfile index 901be54dc..d3994dcc1 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -238,6 +238,7 @@ INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = __JUST_STUBS__ \ __DOXIGEN__ \ + CH_USE_THREAD_EXT \ CH_USE_VIRTUAL_TIMERS \ CH_USE_SYSTEMTIME \ CH_USE_WAITEXIT \ diff --git a/readme.txt b/readme.txt index 4f1c2b485..a05b811b0 100644 --- a/readme.txt +++ b/readme.txt @@ -78,7 +78,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - NEW: Memory Heap Allocator functionality added. The allocator implements a
first-fit strategy but there is an option that allow it to wrap the compiler
provided malloc() that may implement a different strategy. The heap
- allocator is thread-safe and can use both a mutex or a semaphores as
+ allocator is thread-safe and can use both a mutex or a semaphore as
internal synchronization primitive.
- NEW: Memory Pools functionality added, this mechanism allows constant-time
allocation/freeing of constant-size objects. It can be used to dynamically
@@ -98,6 +98,11 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - CHANGE: Removed the CH_USE_TERMINATE, CH_USE_SLEEP, CH_USE_SUSPEND and
CH_USE_RESUME configuration options in order to make the chconf.h file
simpler. The related functions are very small and almost always required.
+- CHANGE: The CH_USE_EXIT_EVENT configuration option and related functions are
+ now deprecated.
+- CHANGE: The P_MSGBYPRIO thread option has been removed, now the threads
+ always serve messages in priority order if the CH_USE_MESSAGES_PRIORITY
+ configuration option is active.
- Added new test cases to the test suite.
*** 0.6.10 ***
diff --git a/src/chheap.c b/src/chheap.c index ecdf7284a..e8ce605c7 100644 --- a/src/chheap.c +++ b/src/chheap.c @@ -185,11 +185,13 @@ void chHeapFree(void *p) { /**
* Determines the heap status.
- * @sizep pointer to a variable that will receive the total fragmented free
- * space
+ * @param sizep pointer to a variable that will receive the total fragmented
+ * free space
* @return the number of fragments in the heap
* @note This function is meant to be used in the test suite, it should not be
* really useful for the application code.
+ * @note This function is not implemented when the \p CH_USE_MALLOC_HEAP
+ * configuration option is used (it always returns zero).
*/
size_t chHeapStatus(size_t *sizep) {
struct header *qp;
diff --git a/src/chmsg.c b/src/chmsg.c index 03b7edd01..5a1ce4b15 100644 --- a/src/chmsg.c +++ b/src/chmsg.c @@ -37,10 +37,7 @@ msg_t chMsgSend(Thread *tp, msg_t msg) { chSysLock();
#ifdef CH_USE_MESSAGES_PRIORITY
- if (tp->p_flags & P_MSGBYPRIO)
- prio_insert(currp, &tp->p_msgqueue);
- else
- queue_insert(currp, &tp->p_msgqueue);
+ prio_insert(currp, &tp->p_msgqueue);
#else
queue_insert(currp, &tp->p_msgqueue);
#endif
@@ -76,10 +73,7 @@ msg_t chMsgSendWithEvent(Thread *tp, msg_t msg, EventSource *esp) { chDbgAssert(tp->p_state != PRWTMSG, "chmsg.c, chMsgSendWithEvent()");
#ifdef CH_USE_MESSAGES_PRIORITY
- if (tp->p_flags & P_MSGBYPRIO)
- prio_insert(currp, &tp->p_msgqueue);
- else
- queue_insert(currp, &tp->p_msgqueue);
+ prio_insert(currp, &tp->p_msgqueue);
#else
queue_insert(currp, &tp->p_msgqueue);
#endif
diff --git a/src/chmtx.c b/src/chmtx.c index 68e8d671b..7ab8ae613 100644 --- a/src/chmtx.c +++ b/src/chmtx.c @@ -83,9 +83,8 @@ void chMtxLockS(Mutex *mp) { continue; #ifdef CH_USE_MESSAGES_PRIORITY case PRSNDMSG: - if (tp->p_flags & P_MSGBYPRIO) - /* requeue tp with its new priority on (?) */ - prio_insert(dequeue(tp), &tp->p_wtthdp->p_msgqueue); + /* requeue tp with its new priority on (?) */ + prio_insert(dequeue(tp), &tp->p_wtthdp->p_msgqueue); break; #endif /* thread tp is ready? */ diff --git a/src/include/threads.h b/src/include/threads.h index 8c3974820..3e70439ac 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -138,10 +138,6 @@ struct Thread { #define P_TERMINATE 1 /** Thread option: Create suspended thread.*/ #define P_SUSPENDED 2 -#ifdef CH_USE_MESSAGES_PRIORITY -/** Thread option: Serve messages by priority instead of FIFO order.*/ -#define P_MSGBYPRIO 4 -#endif /** Pseudo priority used by the ready list header, do not use.*/ #define NOPRIO 0 @@ -205,6 +201,7 @@ extern "C" { * Returns the exit event source for the specified thread. The source is * signaled when the thread terminates. * @param tp the pointer to the thread + * @deprecated * @note When registering on a thread termination make sure the thread * is still alive, if you do that after the thread termination * then you would miss the event. There are two ways to ensure diff --git a/src/templates/chconf.h b/src/templates/chconf.h index d7e42dbed..33d09c00f 100644 --- a/src/templates/chconf.h +++ b/src/templates/chconf.h @@ -103,6 +103,7 @@ /** Configuration option: if specified then the
* \p chThdGetExitEventSource() function is included in the kernel.
+ * @deprecated
* @note requires \p CH_USE_MESSAGES.
* @note requires \p CH_USE_EVENTS.*/
#define CH_USE_EXIT_EVENT
@@ -142,7 +143,7 @@ /** Configuration option: enforces the use of the C-runtime \p malloc() and
* \p free() functions as backend for the system heap allocator.*/
-//#define CH_USE_MALLOC_HEAP
+#define CH_USE_MALLOC_HEAP
/** Configuration option: if specified then the memory pools allocator APIs
* are included in the kernel.*/
|