![]() |
ChibiOS/RT Architecture - Reference Manual - Guides |
Semaphores macros and structures. More...
Go to the source code of this file.
Data Structures | |
| struct | Semaphore |
| Semaphore structure. More... | |
Defines | |
| #define | _SEMAPHORE_DATA(name, n) {_THREADSQUEUE_DATA(name.s_queue), n} |
| Data part of a static semaphore initializer. | |
| #define | SEMAPHORE_DECL(name, n) Semaphore name = _SEMAPHORE_DATA(name, n) |
| Static semaphore initializer. | |
| #define | chSemFastWaitI(sp) ((sp)->s_cnt--) |
| Decreases the semaphore counter. | |
| #define | chSemFastSignalI(sp) ((sp)->s_cnt++) |
| Increases the semaphore counter. | |
| #define | chSemGetCounterI(sp) ((sp)->s_cnt) |
| Returns the semaphore counter current value. | |
Typedefs | |
| typedef struct Semaphore | Semaphore |
| Semaphore structure. | |
Functions | |
| void | chSemInit (Semaphore *sp, cnt_t n) |
| Initializes a semaphore with the specified counter value. | |
| void | chSemReset (Semaphore *sp, cnt_t n) |
| Performs a reset operation on the semaphore. | |
| void | chSemResetI (Semaphore *sp, cnt_t n) |
| Performs a reset operation on the semaphore. | |
| msg_t | chSemWait (Semaphore *sp) |
| Performs a wait operation on a semaphore. | |
| msg_t | chSemWaitS (Semaphore *sp) |
| Performs a wait operation on a semaphore. | |
| msg_t | chSemWaitTimeout (Semaphore *sp, systime_t time) |
| Performs a wait operation on a semaphore with timeout specification. | |
| msg_t | chSemWaitTimeoutS (Semaphore *sp, systime_t time) |
| Performs a wait operation on a semaphore with timeout specification. | |
| void | chSemSignal (Semaphore *sp) |
| Performs a signal operation on a semaphore. | |
| void | chSemSignalI (Semaphore *sp) |
| Performs a signal operation on a semaphore. | |
| msg_t | chSemSignalWait (Semaphore *sps, Semaphore *spw) |
| Performs atomic signal and wait operations on two semaphores. | |
Semaphores macros and structures.
Definition in file chsem.h.
1.7.1