Object representing a mutex. More...
#include <Thread.hpp>
Public Member Functions | |
Mutex (int flags=0) | |
Creates a mutex with the specified flags. | |
void | Lock () |
Locks the mutex. | |
void | Unlock () |
Unlocks the mutex. | |
~Mutex () | |
Destroys the mutex. | |
ALLEGRO_MUTEX * | Release () |
Releases the held C structure so it is no longer automatically freed. | |
operator ALLEGRO_MUTEX * () const | |
Returns a pointer to the Allegro mutex structure. | |
Static Public Attributes | |
static const int | Recursive = 0x80000000 |
Allows recursive locks. |
Object representing a mutex.
a5::Mutex::Mutex | ( | int | flags = 0 |
) |
Creates a mutex with the specified flags.
a5::Mutex::~Mutex | ( | ) |
Destroys the mutex.
void a5::Mutex::Lock | ( | ) |
Locks the mutex.
void a5::Mutex::Unlock | ( | ) |
Unlocks the mutex.
ALLEGRO_MUTEX* a5::Mutex::Release | ( | ) |
Releases the held C structure so it is no longer automatically freed.
a5::Mutex::operator ALLEGRO_MUTEX * | ( | ) | const |
Returns a pointer to the Allegro mutex structure.
const int a5::Mutex::Recursive = 0x80000000 [static] |
Allows recursive locks.