dRonin
adbada4
dRonin firmware
|
Abstracts the concept of a binary semaphore to hide different implementations. More...
Data Structures | |
struct | pios_semaphore |
Macros | |
#define | PIOS_SEMAPHORE_TIMEOUT_MAX 0xffffffff |
Functions | |
struct pios_semaphore * | PIOS_Semaphore_Create (void) |
Creates a binary semaphore. More... | |
bool | PIOS_Semaphore_Take (struct pios_semaphore *sema, uint32_t timeout_ms) |
Takes binary semaphore. More... | |
bool | PIOS_Semaphore_Give (struct pios_semaphore *sema) |
Gives binary semaphore. More... | |
bool | PIOS_Semaphore_Take_FromISR (struct pios_semaphore *sema, bool *woken) |
bool | PIOS_Semaphore_Give_FromISR (struct pios_semaphore *sema, bool *woken) |
Variables | |
uint32_t | pios_semaphore::sema_count |
Abstracts the concept of a binary semaphore to hide different implementations.
#define PIOS_SEMAPHORE_TIMEOUT_MAX 0xffffffff |
Definition at line 30 of file pios_semaphore.h.
struct pios_semaphore * PIOS_Semaphore_Create | ( | void | ) |
Creates a binary semaphore.
struct
pios_semaphore or NULL on failure Definition at line 150 of file pios_semaphore.c.
bool PIOS_Semaphore_Give | ( | struct pios_semaphore * | sema | ) |
Gives binary semaphore.
[in] | sema | pointer to instance of struct pios_semaphore |
Definition at line 202 of file pios_semaphore.c.
bool PIOS_Semaphore_Give_FromISR | ( | struct pios_semaphore * | sema, |
bool * | woken | ||
) |
Definition at line 231 of file pios_semaphore.c.
bool PIOS_Semaphore_Take | ( | struct pios_semaphore * | sema, |
uint32_t | timeout_ms | ||
) |
Takes binary semaphore.
[in] | sema | pointer to instance of struct pios_semaphore |
[in] | timeout_ms | timeout for acquiring the lock in milliseconds |
Definition at line 175 of file pios_semaphore.c.
bool PIOS_Semaphore_Take_FromISR | ( | struct pios_semaphore * | sema, |
bool * | woken | ||
) |
Definition at line 220 of file pios_semaphore.c.
uint32_t pios_semaphore::sema_count |
Definition at line 34 of file pios_semaphore.c.