This function waits a semaphore, and decrease the number of wait operations. Thread is blocked infinitely, if number of semaphore wait operations is 0.
- If multiple threads are waiting same semaphore,
- The highest priority thread is returned
- If multiple threads are waiting same semaphore, and their priority is same
- The thread(which has been waited the longest duration) is returned
- Parameters
-
| [in] | semaphore | Semaphore to wait |
- Returns
- N/A
- Note
- Allowed context for the API call
- This function's safety follow sem_wait() in QNX libc.
- Is thread safe: Yes
- Required Privileges: N/A
- API Group
- Initialization: Yes
- Run time: Yes
- De-initialization: Yes