|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
函数 | |
| int | osal_sem_init (osal_semaphore *sem, int val) |
| Create a semaphore. | |
| int | osal_sem_binary_sem_init (osal_semaphore *sem, int val) |
| Create a binary semaphore. | |
| int | osal_sem_down (osal_semaphore *sem) |
| Request a semaphore. | |
| int | osal_sem_down_timeout (osal_semaphore *sem, unsigned int timeout) |
| Acquire the semaphore within a specified time that specifies the timeout period. | |
| int | osal_sem_down_interruptible (osal_semaphore *sem) |
| acquire the semaphore unless interrupted. | |
| int | osal_sem_trydown (osal_semaphore *sem) |
| try to acquire the semaphore, without waiting. | |
| void | osal_sem_up (osal_semaphore *sem) |
| Release a semaphore. | |
| void | osal_sem_destroy (osal_semaphore *sem) |
| Delete a semaphore. | |
| int osal_sem_binary_sem_init | ( | osal_semaphore * | sem, |
| int | val | ||
| ) |
Create a binary semaphore.
| val | [in] Initial number of available semaphores. The value range is [0, 1]. |
| sem | [out] Pointer of semaphore control structure that is initialized. |
| void osal_sem_destroy | ( | osal_semaphore * | sem | ) |
Delete a semaphore.
| sem | [in] The semaphore to destroyed. |
| int osal_sem_down | ( | osal_semaphore * | sem | ) |
Request a semaphore.
| sem | [in] The semaphore to be acquired. |
| int osal_sem_down_interruptible | ( | osal_semaphore * | sem | ) |
acquire the semaphore unless interrupted.
| sem | [in] The semaphore to be acquired. |
| int osal_sem_down_timeout | ( | osal_semaphore * | sem, |
| unsigned int | timeout | ||
| ) |
Acquire the semaphore within a specified time that specifies the timeout period.
| sem | [in] The semaphore to be acquired. |
| timeout | [in] How long to wait before failing. (unit: ms) |
| int osal_sem_init | ( | osal_semaphore * | sem, |
| int | val | ||
| ) |
Create a semaphore.
| val | [in] Initial number of available semaphores. |
| sem | [out] Pointer of semaphore control structure that is initialized. |
| int osal_sem_trydown | ( | osal_semaphore * | sem | ) |
try to acquire the semaphore, without waiting.
| sem | [in] The semaphore to be acquired. |
| void osal_sem_up | ( | osal_semaphore * | sem | ) |
Release a semaphore.
| sem | [in] The semaphore to release. |