|
ChibiOS 21.11.4
|

Data Structures | |
| struct | ch_binary_semaphore |
| Binary semaphore type. More... | |
Macros | |
| #define | __BSEMAPHORE_DATA(name, taken) |
| Data part of a static semaphore initializer. | |
| #define | BSEMAPHORE_DECL(name, taken) |
| Static semaphore initializer. | |
Typedefs | |
| typedef struct ch_binary_semaphore | binary_semaphore_t |
| Binary semaphore type. | |
Functions | |
| static void | chBSemObjectInit (binary_semaphore_t *bsp, bool taken) |
| Initializes a binary semaphore. | |
| static msg_t | chBSemWait (binary_semaphore_t *bsp) |
| Wait operation on the binary semaphore. | |
| static msg_t | chBSemWaitS (binary_semaphore_t *bsp) |
| Wait operation on the binary semaphore. | |
| static msg_t | chBSemWaitTimeoutS (binary_semaphore_t *bsp, sysinterval_t timeout) |
| Wait operation on the binary semaphore. | |
| static msg_t | chBSemWaitTimeout (binary_semaphore_t *bsp, sysinterval_t timeout) |
| Wait operation on the binary semaphore. | |
| static void | chBSemResetI (binary_semaphore_t *bsp, bool taken) |
| Reset operation on the binary semaphore. | |
| static void | chBSemReset (binary_semaphore_t *bsp, bool taken) |
| Reset operation on the binary semaphore. | |
| static void | chBSemSignalI (binary_semaphore_t *bsp) |
| Performs a signal operation on a binary semaphore. | |
| static void | chBSemSignal (binary_semaphore_t *bsp) |
| Performs a signal operation on a binary semaphore. | |
| static bool | chBSemGetStateI (const binary_semaphore_t *bsp) |
| Returns the binary semaphore current state. | |
| #define __BSEMAPHORE_DATA | ( | name, | |
| taken ) |
Data part of a static semaphore initializer.
This macro should be used when statically initializing a semaphore that is part of a bigger structure.
| [in] | name | the name of the semaphore variable |
| [in] | taken | the semaphore initial state |
| #define BSEMAPHORE_DECL | ( | name, | |
| taken ) |
Static semaphore initializer.
Statically initialized semaphores require no explicit initialization using chBSemInit().
| [in] | name | the name of the semaphore variable |
| [in] | taken | the semaphore initial state |
| typedef struct ch_binary_semaphore binary_semaphore_t |
Binary semaphore type.
|
inlinestatic |
Initializes a binary semaphore.
| [out] | bsp | pointer to a binary_semaphore_t structure |
| [in] | taken | initial state of the binary semaphore:
|
Definition at line 124 of file chbsem.h.
References chSemObjectInit, and ch_binary_semaphore::sem.
|
inlinestatic |
Wait operation on the binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
| MSG_OK | if the binary semaphore has been successfully taken. |
| MSG_RESET | if the binary semaphore has been reset using chBSemReset(). |
Definition at line 141 of file chbsem.h.
References chSemWait, and ch_binary_semaphore::sem.
|
inlinestatic |
Wait operation on the binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
| MSG_OK | if the binary semaphore has been successfully taken. |
| MSG_RESET | if the binary semaphore has been reset using chBSemReset(). |
Definition at line 158 of file chbsem.h.
References chDbgCheckClassS, chSemWaitS, and ch_binary_semaphore::sem.
|
inlinestatic |
Wait operation on the binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
| MSG_OK | if the binary semaphore has been successfully taken. |
| MSG_RESET | if the binary semaphore has been reset using chBSemReset(). |
| MSG_TIMEOUT | if the binary semaphore has not been signaled or reset within the specified timeout. |
Definition at line 184 of file chbsem.h.
References chDbgCheckClassS, chSemWaitTimeoutS(), and ch_binary_semaphore::sem.

|
inlinestatic |
Wait operation on the binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
| MSG_OK | if the binary semaphore has been successfully taken. |
| MSG_RESET | if the binary semaphore has been reset using chBSemReset(). |
| MSG_TIMEOUT | if the binary semaphore has not been signaled or reset within the specified timeout. |
Definition at line 211 of file chbsem.h.
References chSemWaitTimeout(), and ch_binary_semaphore::sem.

|
inlinestatic |
Reset operation on the binary semaphore.
chBSemWait() will return MSG_RESET instead of MSG_OK. | [in] | bsp | pointer to a binary_semaphore_t structure |
| [in] | taken | new state of the binary semaphore
|
Definition at line 232 of file chbsem.h.
References chDbgCheckClassI, chSemResetI, and ch_binary_semaphore::sem.
|
inlinestatic |
Reset operation on the binary semaphore.
chBSemWait() will return MSG_RESET instead of MSG_OK.| [in] | bsp | pointer to a binary_semaphore_t structure |
| [in] | taken | new state of the binary semaphore
|
Definition at line 253 of file chbsem.h.
References chSemReset, and ch_binary_semaphore::sem.
|
inlinestatic |
Performs a signal operation on a binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
Definition at line 266 of file chbsem.h.
References chDbgCheckClassI, chSemSignalI(), ch_semaphore::cnt, and ch_binary_semaphore::sem.
Referenced by chBSemSignal().

|
inlinestatic |
Performs a signal operation on a binary semaphore.
| [in] | bsp | pointer to a binary_semaphore_t structure |
Definition at line 282 of file chbsem.h.
References chBSemSignalI(), chSchRescheduleS(), chSysLock, and chSysUnlock.

|
inlinestatic |
Returns the binary semaphore current state.
| [in] | bsp | pointer to a binary_semaphore_t structure |
| false | if the binary semaphore is not taken. |
| true | if the binary semaphore is taken. |
Definition at line 300 of file chbsem.h.
References chDbgCheckClassI, ch_semaphore::cnt, and ch_binary_semaphore::sem.