Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of OmniWheels by
Semaphores
[OS abstraction layer]
Functions | |
err_t | sys_sem_new (sys_sem_t *sem, u8_t count) |
Create a new semaphore. | |
void | sys_sem_signal (sys_sem_t *sem) |
Signals a semaphore. | |
u32_t | sys_arch_sem_wait (sys_sem_t *sem, u32_t timeout) |
Wait for a semaphore for the specified timeout. | |
void | sys_sem_free (sys_sem_t *sem) |
Delete a semaphore. | |
int | sys_sem_valid (sys_sem_t *sem) |
Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid. | |
void | sys_sem_set_invalid (sys_sem_t *sem) |
Set a semaphore invalid so that sys_sem_valid returns 0. |
Function Documentation
u32_t sys_arch_sem_wait | ( | sys_sem_t * | sem, |
u32_t | timeout | ||
) |
Wait for a semaphore for the specified timeout.
- Parameters:
-
sem the semaphore to wait for timeout timeout in milliseconds to wait (0 = wait forever)
- Returns:
- time (in milliseconds) waited for the semaphore or SYS_ARCH_TIMEOUT on timeout
Definition at line 341 of file lwip_sys_arch.c.
void sys_sem_free | ( | sys_sem_t * | sem ) |
Delete a semaphore.
- Parameters:
-
sem semaphore to delete
Definition at line 371 of file lwip_sys_arch.c.
err_t sys_sem_new | ( | sys_sem_t * | sem, |
u8_t | count | ||
) |
Create a new semaphore.
- Parameters:
-
sem pointer to the semaphore to create count initial count of the semaphore
- Returns:
- ERR_OK if successful, another err_t otherwise
Definition at line 307 of file lwip_sys_arch.c.
void sys_sem_set_invalid | ( | sys_sem_t * | sem ) |
Set a semaphore invalid so that sys_sem_valid returns 0.
void sys_sem_signal | ( | sys_sem_t * | sem ) |
Signals a semaphore.
- Parameters:
-
sem the semaphore to signal
Definition at line 358 of file lwip_sys_arch.c.
int sys_sem_valid | ( | sys_sem_t * | sem ) |
Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid.
Generated on Fri Jul 22 2022 04:54:09 by
