17 #include <SDL_thread.h>
26 SDL_mutex *data_mutex;
35 data_mutex = SDL_CreateMutex();
42 SDL_DestroyMutex(data_mutex);
49 SDL_mutexP(data_mutex);
51 SDL_mutexV(data_mutex);
59 SDL_mutexP(data_mutex);
61 SDL_mutexV(data_mutex);
~scm_guard()
Destroy this guard's mutex.
Definition: scm-guard.hpp:40
void set(T d)
Atomically set the guarded value.
Definition: scm-guard.hpp:47
The scm_guard template enforces mutual exclusion on a single value of its templated type...
Definition: scm-guard.hpp:24
scm_guard(T d)
Create the mutex for this guard.
Definition: scm-guard.hpp:33