|
Zth (libzth)
|
Functions | |
| int | zth_mutex_init (zth_mutex_t *mutex) noexcept |
| Initializes a mutex. More... | |
| int | zth_mutex_destroy (zth_mutex_t *mutex) noexcept |
| Destroys a mutex. More... | |
| int | zth_mutex_lock (zth_mutex_t *mutex) noexcept |
| Locks a mutex. More... | |
| int | zth_mutex_trylock (zth_mutex_t *mutex) noexcept |
| Try to lock a mutex. More... | |
| int | zth_mutex_unlock (zth_mutex_t *mutex) noexcept |
| Unlock a mutex. More... | |
| int | zth_sem_init (zth_sem_t *sem, size_t value) noexcept |
| Initializes a semaphore. More... | |
| int | zth_sem_destroy (zth_sem_t *sem) noexcept |
| Destroys a semaphore. More... | |
| int | zth_sem_getvalue (zth_sem_t *__restrict__ sem, size_t *__restrict__ value) noexcept |
| Returns the value of a semaphore. More... | |
| int | zth_sem_post (zth_sem_t *sem) noexcept |
| Increments a semaphore. More... | |
| int | zth_sem_wait (zth_sem_t *sem) noexcept |
| Decrements (or wait for) a semaphore. More... | |
| int | zth_sem_trywait (zth_sem_t *sem) noexcept |
| Try to decrement a semaphore. More... | |
| int | zth_cond_init (zth_cond_t *cond) noexcept |
| Initializes a condition. More... | |
| int | zth_cond_destroy (zth_cond_t *cond) noexcept |
| Destroys a condition. More... | |
| int | zth_cond_signal (zth_cond_t *cond) noexcept |
| Signals one fiber waiting for the condition. More... | |
| int | zth_cond_broadcast (zth_cond_t *cond) noexcept |
| Signals all fibers waiting for the condition. More... | |
| int | zth_cond_wait (zth_cond_t *cond) noexcept |
| Wait for a condition. More... | |
| int | zth_future_init (zth_future_t *future) noexcept |
| Initializes a future. More... | |
| int | zth_future_destroy (zth_future_t *future) noexcept |
| Destroys a future. More... | |
| int | zth_future_valid (zth_future_t *future) noexcept |
| Checks if a future was already set. More... | |
| int | zth_future_set (zth_future_t *future, uintptr_t value) noexcept |
| Sets a future and signals all waiting fibers. More... | |
| int | zth_future_get (zth_future_t *__restrict__ future, uintptr_t *__restrict__ value) noexcept |
| Wait for and return a future's value. More... | |
| int | zth_future_wait (zth_future_t *future) noexcept |
| Wait for a future. More... | |
| int | zth_gate_init (zth_gate_t *gate, size_t count) noexcept |
| Initializes a gate. More... | |
| int | zth_gate_destroy (zth_gate_t *gate) noexcept |
| Destroys a gate. More... | |
| int | zth_gate_pass (zth_gate_t *gate) noexcept |
| Passes a gate. More... | |
| int | zth_gate_wait (zth_gate_t *gate) noexcept |
| Wait for a gate. More... | |
|
noexcept |
Signals all fibers waiting for the condition.
This is a C-wrapper for zth::Signal::signalAll().
|
noexcept |
Destroys a condition.
This is a C-wrapper to delete a zth::Signal.
|
noexcept |
Initializes a condition.
This is a C-wrapper to create a new zth::Signal.
|
noexcept |
Signals one fiber waiting for the condition.
This is a C-wrapper for zth::Signal::signal().
|
noexcept |
Wait for a condition.
This is a C-wrapper for zth::Signal::wait().
|
noexcept |
Destroys a future.
This is a C-wrapper to delete a zth::Future.
|
noexcept |
Wait for and return a future's value.
This is a C-wrapper for zth::Future::value().
|
noexcept |
Initializes a future.
This is a C-wrapper to create a new zth::Future.
|
noexcept |
Sets a future and signals all waiting fibers.
This is a C-wrapper for zth::Future::set().
|
noexcept |
Checks if a future was already set.
This is a C-wrapper for zth::Future::valid().
|
noexcept |
Wait for a future.
This is a C-wrapper for zth::Future::wait().
|
noexcept |
|
noexcept |
Initializes a gate.
If all participants call zth_gate_wait(), the gate behaves the same as a pthread_barrier_t would.
This is a C-wrapper to create a new zth::Gate.
|
noexcept |
|
noexcept |
|
noexcept |
Destroys a mutex.
This is a C-wrapper to delete a zth::Mutex.
|
noexcept |
Initializes a mutex.
This is a C-wrapper to create a new zth::Mutex.
|
noexcept |
|
noexcept |
Try to lock a mutex.
This is a C-wrapper for zth::Mutex::trylock().
|
noexcept |
Unlock a mutex.
This is a C-wrapper for zth::Mutex::unlock().
|
noexcept |
Destroys a semaphore.
This is a C-wrapper to delete a zth::Semaphore.
|
noexcept |
Returns the value of a semaphore.
This is a C-wrapper for zth::Semaphore::value().
|
noexcept |
Initializes a semaphore.
This is a C-wrapper to create a new zth::Semaphore.
|
noexcept |
|
noexcept |