|
Anklang-0.3.0.dev712+gdc4e642f anklang-0.3.0.dev712+gdc4e642f
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Public Member Functions | |
| ScopedSemaphore () noexcept | |
| Create a process-local semaphore. | |
| int | post () noexcept |
| Unlock ScopedSemaphore. | |
| int | wait () noexcept |
| Wait indefinitely for ScopedSemaphore. | |
| int | wait_for (uint64_t useconds) noexcept |
| Wait for ScopedSemaphore with timeout (microseconds). | |
| ~ScopedSemaphore () noexcept | |
| Release associated semaphore resources. | |
Definition at line 104 of file platform.hh.
|
explicitnoexcept |
Create a process-local semaphore.
A RAII wrapper around POSIX unnamed semaphores for thread synchronization.
Definition at line 853 of file platform.cc.
References assert_return, and sem_init().
|
noexcept |
Release associated semaphore resources.
Definition at line 900 of file platform.cc.
References assert_return, and sem_destroy().
|
noexcept |
Unlock ScopedSemaphore.
Post (increment) the semaphore value,.
Definition at line 863 of file platform.cc.
References errno(), and sem_post().
|
noexcept |
Wait indefinitely for ScopedSemaphore.
Wait indefinitely for the semaphore to become available,.
Definition at line 873 of file platform.cc.
References errno(), and sem_wait().
Wait for ScopedSemaphore with timeout (microseconds).
Wait for the semaphore with a timeout in µseconds,.
Definition at line 883 of file platform.cc.
References errno(), long, sem_timedwait(), time_t, Ase::timestamp_realtime(), and uint64_t.