git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@507 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2008-11-09 12:03:59 +00:00
parent 0dd1ffc088
commit d7d284843e
4 changed files with 22 additions and 5 deletions

View File

@ -254,6 +254,7 @@ PREDEFINED = __JUST_STUBS__ \
CH_USE_SEMSW \ CH_USE_SEMSW \
CH_USE_SEMAPHORES_TIMEOUT \ CH_USE_SEMAPHORES_TIMEOUT \
CH_USE_MUTEXES \ CH_USE_MUTEXES \
CH_USE_CONDVARS \
CH_USE_EVENTS \ CH_USE_EVENTS \
CH_USE_EVENTS_TIMEOUT \ CH_USE_EVENTS_TIMEOUT \
CH_USE_EXIT_EVENT \ CH_USE_EXIT_EVENT \

View File

@ -456,6 +456,21 @@
*/ */
/** @} */ /** @} */
/**
* @defgroup CondVars Conditional Variables
* @{
* Conditional Variables and threads synchronization.
* <b>Operation mode</b><br><br>
* 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.<br>
* In order to use the Conditional Variables APIs the \p CH_USE_CONDVARS
* option must be specified in \p chconf.h.<br><br>
* @file condvars.h Conditional Variables macros and structures.
* @file chcond.c Conditional Variables code.
*/
/** @} */
/** /**
* @defgroup Events Events * @defgroup Events Events
* @{ * @{

View File

@ -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 CH_USE_DEBUG is disabled, it produces no code but allows to check the
optional code without have to compile twice. optional code without have to compile twice.
- FIX: Fixed a warning generated by the chEvtIsListening() macro. - 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). - 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 - Renamed the macro fifo_init() to queue_init() because it is used to init
both FIFO queues and priority queues. both FIFO queues and priority queues.

View File

@ -42,7 +42,7 @@ void chCondInit(CondVar *cp) {
/** /**
* Signals one thread that is waiting on the condition variable. * 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) { void chCondSignal(CondVar *cp) {
@ -70,7 +70,7 @@ void chCondSignalI(CondVar *cp) {
/** /**
* Signal all threads that are waiting on the condition variable. * 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) { void chCondBroadcast(CondVar *cp) {