aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-09-06 08:56:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-09-06 08:56:34 +0000
commit15ee17c8740a378cffcae681421b9e28fcde3d4c (patch)
treed5af4d9abff327bc5c05ec2b5ba56a6668aacf28 /src
parent517440bad9d6d2f27689e4e3de72794d869d2c26 (diff)
downloadChibiOS-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
Diffstat (limited to 'src')
-rw-r--r--src/chheap.c6
-rw-r--r--src/chmsg.c10
-rw-r--r--src/chmtx.c5
-rw-r--r--src/include/threads.h5
-rw-r--r--src/templates/chconf.h3
5 files changed, 11 insertions, 18 deletions
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.*/