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

master
gdisirio 2014-09-14 12:20:18 +00:00
parent f42d8a8898
commit 7fa10b4b78
1 changed files with 9 additions and 9 deletions

View File

@ -26,25 +26,25 @@
* @details Binary semaphores related APIs and services. * @details Binary semaphores related APIs and services.
* *
* <h2>Operation mode</h2> * <h2>Operation mode</h2>
* Binary semaphores are implemented as a set of macros that use the * Binary semaphores are implemented as a set of inline functions
* existing counting semaphores primitives. The difference between * that use the existing counting semaphores primitives. The
* counting and binary semaphores is that the counter of binary * difference between counting and binary semaphores is that the
* semaphores is not allowed to grow above the value 1. Repeated * counter of binary semaphores is not allowed to grow above the
* signal operation are ignored. A binary semaphore can thus have * value 1. Repeated signal operation are ignored. A binary
* only two defined states: * semaphore can thus have only two defined states:
* - <b>Taken</b>, when its counter has a value of zero or lower * - <b>Taken</b>, when its counter has a value of zero or lower
* than zero. A negative number represent the number of threads * than zero. A negative number represent the number of threads
* queued on the binary semaphore. * queued on the binary semaphore.
* - <b>Not taken</b>, when its counter has a value of one. * - <b>Not taken</b>, when its counter has a value of one.
* . * .
* Binary semaphores are different from mutexes because there is no * Binary semaphores are different from mutexes because there is no
* the concept of ownership, a binary semaphore can be taken by a * concept of ownership, a binary semaphore can be taken by a
* thread and signaled by another thread or an interrupt handler, * thread and signaled by another thread or an interrupt handler,
* mutexes can only be taken and released by the same thread. Another * mutexes can only be taken and released by the same thread. Another
* difference is that binary semaphores, unlike mutexes, do not * difference is that binary semaphores, unlike mutexes, do not
* implement the priority inheritance protocol.<br> * implement the priority inheritance protocol.<br>
* In order to use the binary semaphores APIs the @p CH_CFG_USE_SEMAPHORES * In order to use the binary semaphores APIs the
* option must be enabled in @p chconf.h. * @p CH_CFG_USE_SEMAPHORES option must be enabled in @p chconf.h.
* @{ * @{
*/ */