SDL3pp
A slim C++ wrapper for SDL3
|
SDL offers several thread synchronization primitives. More...
Classes | |
struct | SDL::MutexBase |
A means to serialize access to a resource between threads. More... | |
struct | SDL::MutexRef |
Handle to a non owned mutex. More... | |
struct | SDL::Mutex |
Handle to an owned mutex. More... | |
struct | SDL::RWLockBase |
A mutex that allows read-only threads to run in parallel. More... | |
struct | SDL::RWLockRef |
Handle to a non owned rWLock. More... | |
struct | SDL::RWLock |
Handle to an owned rWLock. More... | |
struct | SDL::SemaphoreBase |
A means to manage access to a resource, by count, between threads. More... | |
struct | SDL::SemaphoreRef |
Handle to a non owned semaphore. More... | |
struct | SDL::Semaphore |
Handle to an owned semaphore. More... | |
struct | SDL::ConditionBase |
A means to block multiple threads until a condition is satisfied. More... | |
struct | SDL::ConditionRef |
Handle to a non owned condition. More... | |
struct | SDL::Condition |
Handle to an owned condition. More... | |
struct | SDL::InitState |
A structure used for thread-safe initialization and shutdown. More... | |
Typedefs | |
using | SDL::InitStatus = SDL_InitStatus |
The current status of an InitState structure. | |
Variables | |
constexpr InitStatus | SDL::INIT_STATUS_UNINITIALIZED |
INIT_STATUS_UNINITIALIZED. | |
constexpr InitStatus | SDL::INIT_STATUS_INITIALIZING |
INIT_STATUS_INITIALIZING. | |
constexpr InitStatus | SDL::INIT_STATUS_INITIALIZED |
INIT_STATUS_INITIALIZED. | |
constexpr InitStatus | SDL::INIT_STATUS_UNINITIALIZING |
INIT_STATUS_UNINITIALIZING. | |
This document can't cover the complicated topic of thread safety, but reading up on what each of these primitives are, why they are useful, and how to correctly use them is vital to writing correct and safe multithreaded programs.
SDL also offers a datatype, InitState, which can be used to make sure only one thread initializes/deinitializes some resource that several threads might try to use for the first time simultaneously.
using SDL::InitStatus = typedef SDL_InitStatus |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |