libnx
v4.8.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. More... | |
void | semaphoreSignal (Semaphore *s) |
Increments the Semaphore to allow other threads to continue. More... | |
void | semaphoreWait (Semaphore *s) |
Decrements Semaphore and waits if 0. More... | |
bool | semaphoreTryWait (Semaphore *s) |
Attempts to get lock without waiting. More... | |
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. |