|
The Pedigree Project
0.1
|
Collaboration diagram for Semaphores:Functions | |
| err_t | sys_sem_new (sys_sem_t *sem, u8_t count) |
| void | sys_sem_signal (sys_sem_t *sem) |
| u32_t | sys_arch_sem_wait (sys_sem_t *sem, u32_t timeout) |
| void | sys_sem_free (sys_sem_t *sem) |
| int | sys_sem_valid (sys_sem_t *sem) |
| void | sys_sem_set_invalid (sys_sem_t *sem) |
| u32_t sys_arch_sem_wait | ( | sys_sem_t * | sem, |
| u32_t | timeout | ||
| ) |
Wait for a semaphore for the specified timeout
| sem | the semaphore to wait for |
| timeout | timeout in milliseconds to wait (0 = wait forever) |
Definition at line 157 of file sys_arch.cc.
References Semaphore::acquire(), ERR_ARG, ERR_OK, and SYS_ARCH_TIMEOUT.
Referenced by sys_msleep(), tcpip_api_call(), and tcpip_send_msg_wait_sem().
Here is the caller graph for this function:| void sys_sem_free | ( | sys_sem_t * | sem | ) |
Delete a semaphore
| sem | semaphore to delete |
Definition at line 113 of file sys_arch.cc.
Referenced by sys_msleep(), and tcpip_api_call().
Here is the caller graph for this function:| err_t sys_sem_new | ( | sys_sem_t * | sem, |
| u8_t | count | ||
| ) |
Create a new semaphore
| sem | pointer to the semaphore to create |
| count | initial count of the semaphore |
Definition at line 95 of file sys_arch.cc.
References ERR_ARG, and ERR_OK.
Referenced by sys_msleep(), and tcpip_api_call().
Here is the caller graph for this function:| void sys_sem_set_invalid | ( | sys_sem_t * | sem | ) |
Set a semaphore invalid so that sys_sem_valid returns 0
Definition at line 140 of file sys_arch.cc.
| void sys_sem_signal | ( | sys_sem_t * | sem | ) |
Signals a semaphore
| sem | the semaphore to signal |
Definition at line 147 of file sys_arch.cc.
References Semaphore::release().
| int sys_sem_valid | ( | sys_sem_t * | sem | ) |
Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid
Definition at line 124 of file sys_arch.cc.
Referenced by tcpip_send_msg_wait_sem().
Here is the caller graph for this function:
1.8.11