git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@426 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
517440bad9
commit
15ee17c874
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @note requires \p CH_USE_EVENTS.*/
|
||||||
//#define CH_USE_EXIT_EVENT
|
//#define CH_USE_EXIT_EVENT
|
||||||
|
|
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -98,13 +98,14 @@
|
||||||
/** Configuration option: If enabled then the threads have an option to serve
|
/** Configuration option: If enabled then the threads have an option to serve
|
||||||
* messages by priority instead of FIFO order.
|
* messages by priority instead of FIFO order.
|
||||||
* @note requires \p CH_USE_MESSAGES.*/
|
* @note requires \p CH_USE_MESSAGES.*/
|
||||||
//#define CH_USE_MESSAGES_PRIORITY
|
#define CH_USE_MESSAGES_PRIORITY
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,9 +102,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -103,9 +103,10 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @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
|
/** Configuration option: if specified then the I/O queues APIs are included
|
||||||
* in the kernel.*/
|
* in the kernel.*/
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @note requires \p CH_USE_EVENTS.*/
|
||||||
#define CH_USE_EXIT_EVENT
|
#define CH_USE_EXIT_EVENT
|
||||||
|
|
|
@ -238,6 +238,7 @@ INCLUDE_PATH =
|
||||||
INCLUDE_FILE_PATTERNS =
|
INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = __JUST_STUBS__ \
|
PREDEFINED = __JUST_STUBS__ \
|
||||||
__DOXIGEN__ \
|
__DOXIGEN__ \
|
||||||
|
CH_USE_THREAD_EXT \
|
||||||
CH_USE_VIRTUAL_TIMERS \
|
CH_USE_VIRTUAL_TIMERS \
|
||||||
CH_USE_SYSTEMTIME \
|
CH_USE_SYSTEMTIME \
|
||||||
CH_USE_WAITEXIT \
|
CH_USE_WAITEXIT \
|
||||||
|
|
|
@ -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
|
- 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
|
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
|
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.
|
internal synchronization primitive.
|
||||||
- NEW: Memory Pools functionality added, this mechanism allows constant-time
|
- NEW: Memory Pools functionality added, this mechanism allows constant-time
|
||||||
allocation/freeing of constant-size objects. It can be used to dynamically
|
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
|
- 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
|
CH_USE_RESUME configuration options in order to make the chconf.h file
|
||||||
simpler. The related functions are very small and almost always required.
|
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.
|
- Added new test cases to the test suite.
|
||||||
|
|
||||||
*** 0.6.10 ***
|
*** 0.6.10 ***
|
||||||
|
|
|
@ -185,11 +185,13 @@ void chHeapFree(void *p) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines the heap status.
|
* Determines the heap status.
|
||||||
* @sizep pointer to a variable that will receive the total fragmented free
|
* @param sizep pointer to a variable that will receive the total fragmented
|
||||||
* space
|
* free space
|
||||||
* @return the number of fragments in the heap
|
* @return the number of fragments in the heap
|
||||||
* @note This function is meant to be used in the test suite, it should not be
|
* @note This function is meant to be used in the test suite, it should not be
|
||||||
* really useful for the application code.
|
* 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) {
|
size_t chHeapStatus(size_t *sizep) {
|
||||||
struct header *qp;
|
struct header *qp;
|
||||||
|
|
10
src/chmsg.c
10
src/chmsg.c
|
@ -37,10 +37,7 @@ msg_t chMsgSend(Thread *tp, msg_t msg) {
|
||||||
chSysLock();
|
chSysLock();
|
||||||
|
|
||||||
#ifdef CH_USE_MESSAGES_PRIORITY
|
#ifdef CH_USE_MESSAGES_PRIORITY
|
||||||
if (tp->p_flags & P_MSGBYPRIO)
|
prio_insert(currp, &tp->p_msgqueue);
|
||||||
prio_insert(currp, &tp->p_msgqueue);
|
|
||||||
else
|
|
||||||
queue_insert(currp, &tp->p_msgqueue);
|
|
||||||
#else
|
#else
|
||||||
queue_insert(currp, &tp->p_msgqueue);
|
queue_insert(currp, &tp->p_msgqueue);
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,10 +73,7 @@ msg_t chMsgSendWithEvent(Thread *tp, msg_t msg, EventSource *esp) {
|
||||||
|
|
||||||
chDbgAssert(tp->p_state != PRWTMSG, "chmsg.c, chMsgSendWithEvent()");
|
chDbgAssert(tp->p_state != PRWTMSG, "chmsg.c, chMsgSendWithEvent()");
|
||||||
#ifdef CH_USE_MESSAGES_PRIORITY
|
#ifdef CH_USE_MESSAGES_PRIORITY
|
||||||
if (tp->p_flags & P_MSGBYPRIO)
|
prio_insert(currp, &tp->p_msgqueue);
|
||||||
prio_insert(currp, &tp->p_msgqueue);
|
|
||||||
else
|
|
||||||
queue_insert(currp, &tp->p_msgqueue);
|
|
||||||
#else
|
#else
|
||||||
queue_insert(currp, &tp->p_msgqueue);
|
queue_insert(currp, &tp->p_msgqueue);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -83,9 +83,8 @@ void chMtxLockS(Mutex *mp) {
|
||||||
continue;
|
continue;
|
||||||
#ifdef CH_USE_MESSAGES_PRIORITY
|
#ifdef CH_USE_MESSAGES_PRIORITY
|
||||||
case PRSNDMSG:
|
case PRSNDMSG:
|
||||||
if (tp->p_flags & P_MSGBYPRIO)
|
/* requeue tp with its new priority on (?) */
|
||||||
/* requeue tp with its new priority on (?) */
|
prio_insert(dequeue(tp), &tp->p_wtthdp->p_msgqueue);
|
||||||
prio_insert(dequeue(tp), &tp->p_wtthdp->p_msgqueue);
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
/* thread tp is ready? */
|
/* thread tp is ready? */
|
||||||
|
|
|
@ -138,10 +138,6 @@ struct Thread {
|
||||||
#define P_TERMINATE 1
|
#define P_TERMINATE 1
|
||||||
/** Thread option: Create suspended thread.*/
|
/** Thread option: Create suspended thread.*/
|
||||||
#define P_SUSPENDED 2
|
#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.*/
|
/** Pseudo priority used by the ready list header, do not use.*/
|
||||||
#define NOPRIO 0
|
#define NOPRIO 0
|
||||||
|
@ -205,6 +201,7 @@ extern "C" {
|
||||||
* Returns the exit event source for the specified thread. The source is
|
* Returns the exit event source for the specified thread. The source is
|
||||||
* signaled when the thread terminates.
|
* signaled when the thread terminates.
|
||||||
* @param tp the pointer to the thread
|
* @param tp the pointer to the thread
|
||||||
|
* @deprecated
|
||||||
* @note When registering on a thread termination make sure the thread
|
* @note When registering on a thread termination make sure the thread
|
||||||
* is still alive, if you do that after the thread termination
|
* is still alive, if you do that after the thread termination
|
||||||
* then you would miss the event. There are two ways to ensure
|
* then you would miss the event. There are two ways to ensure
|
||||||
|
|
|
@ -103,6 +103,7 @@
|
||||||
|
|
||||||
/** Configuration option: if specified then the
|
/** Configuration option: if specified then the
|
||||||
* \p chThdGetExitEventSource() function is included in the kernel.
|
* \p chThdGetExitEventSource() function is included in the kernel.
|
||||||
|
* @deprecated
|
||||||
* @note requires \p CH_USE_MESSAGES.
|
* @note requires \p CH_USE_MESSAGES.
|
||||||
* @note requires \p CH_USE_EVENTS.*/
|
* @note requires \p CH_USE_EVENTS.*/
|
||||||
#define CH_USE_EXIT_EVENT
|
#define CH_USE_EXIT_EVENT
|
||||||
|
@ -142,7 +143,7 @@
|
||||||
|
|
||||||
/** Configuration option: enforces the use of the C-runtime \p malloc() and
|
/** Configuration option: enforces the use of the C-runtime \p malloc() and
|
||||||
* \p free() functions as backend for the system heap allocator.*/
|
* \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
|
/** Configuration option: if specified then the memory pools allocator APIs
|
||||||
* are included in the kernel.*/
|
* are included in the kernel.*/
|
||||||
|
|
Loading…
Reference in New Issue