|
libnx v4.9.0
|
Thread synchronization based on Mutex. More...
Go to the source code of this file.
Data Structures | |
| struct | Semaphore |
| Semaphore structure. More... | |
Functions | |
| void | semaphoreInit (Semaphore *s, u64 initial_count) |
| Initializes a semaphore and its internal counter. | |
| void | semaphoreSignal (Semaphore *s) |
| Increments the Semaphore to allow other threads to continue. | |
| void | semaphoreWait (Semaphore *s) |
| Decrements Semaphore and waits if 0. | |
| bool | semaphoreTryWait (Semaphore *s) |
| Attempts to get lock without waiting. | |
Thread synchronization based on Mutex.
Initializes a semaphore and its internal counter.
| s | Semaphore object. |
| initial_count | initial value for internal counter (typically the # of free resources). |
| void semaphoreSignal | ( | Semaphore * | s | ) |
| bool semaphoreTryWait | ( | Semaphore * | s | ) |
Attempts to get lock without waiting.
| s | Semaphore object. |