diff --git a/docs/Doxyfile b/docs/Doxyfile index 87854bc1b..93ad2cc0a 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -254,6 +254,7 @@ PREDEFINED = __JUST_STUBS__ \ CH_USE_SEMSW \ CH_USE_SEMAPHORES_TIMEOUT \ CH_USE_MUTEXES \ + CH_USE_CONDVARS \ CH_USE_EVENTS \ CH_USE_EVENTS_TIMEOUT \ CH_USE_EXIT_EVENT \ diff --git a/docs/ch.txt b/docs/ch.txt index 90a92c294..bfaf66717 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -66,7 +66,7 @@ * The possible groups are: \a Sys, \a Sch, \a VT, \a Thd, \a Sem, \a Mtx, * \a Evt, \a Msg, \a IQ, \a OQ, \a HQ,\a FDD, \a HDD, \a Dbg. * The suffix is not present for normal APIs but can be one of - * the following: "I" for APIs meant to be invoked within the system mutex + * the following: "I" for APIs meant to be invoked within the system mutex * zone, "S" for APIs only useable from within the system mutex zone but not * from interrupt handlers.
* The APIs without suffix can be invoked only from the user code outsize the @@ -456,6 +456,21 @@ */ /** @} */ +/** + * @defgroup CondVars Conditional Variables + * @{ + * Conditional Variables and threads synchronization. + * Operation mode

+ * The condition variable is a synchronization object meant to be used inside + * a zone protected by a \p Mutex. Mutexes and CondVars together can implement + * a Monitor construct.
+ * In order to use the Conditional Variables APIs the \p CH_USE_CONDVARS + * option must be specified in \p chconf.h.

+ * @file condvars.h Conditional Variables macros and structures. + * @file chcond.c Conditional Variables code. + */ +/** @} */ + /** * @defgroup Events Events * @{ @@ -490,7 +505,7 @@ * server threads but just a pointer passed so the exchange is very time * efficient.
* Messages are usually processed in FIFO order but it is possible to process - * them in priority order by specifying CH_USE_MESSAGES_PRIORITY + * them in priority order by specifying CH_USE_MESSAGES_PRIORITY * in \p chconf.h.
* Threads do not need to allocate space for message queues, the mechanism * just requires two extra pointers in the \p Thread structure (the message diff --git a/readme.txt b/readme.txt index d76a9e3eb..c6f83ece6 100644 --- a/readme.txt +++ b/readme.txt @@ -91,7 +91,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, CH_USE_DEBUG is disabled, it produces no code but allows to check the optional code without have to compile twice. - FIX: Fixed a warning generated by the chEvtIsListening() macro. -- Added new test cases to the test suite about the new events APIs. +- Added new test cases to the test suite about condvars and the new events + APIs. - Added a new benchmark to the test suite (timers set/reset performance). - Renamed the macro fifo_init() to queue_init() because it is used to init both FIFO queues and priority queues. diff --git a/src/chcond.c b/src/chcond.c index 27e746d39..dbf7e28f7 100644 --- a/src/chcond.c +++ b/src/chcond.c @@ -42,7 +42,7 @@ void chCondInit(CondVar *cp) { /** * Signals one thread that is waiting on the condition variable. * - * @param mp pointer to the \p CondVar structure + * @param cp pointer to the \p CondVar structure */ void chCondSignal(CondVar *cp) { @@ -70,7 +70,7 @@ void chCondSignalI(CondVar *cp) { /** * Signal all threads that are waiting on the condition variable. * - * @param mp pointer to the \p CondVar structure + * @param cp pointer to the \p CondVar structure */ void chCondBroadcast(CondVar *cp) {