A mutex for mutual exclausion among several threads. More...
#include <thread.hpp>
Public Member Functions | |
Mutex (void) | |
Initialize mutex. | |
void | acquire (void) |
Acquire the mutex and possibly block. | |
bool | tryacquire (void) |
Try to acquire the mutex, return true if succesful. | |
void | release (void) |
Release the mutex. | |
~Mutex (void) | |
Delete mutex. | |
Static Public Member Functions | |
static void * | operator new (size_t s) |
Allocate memory from heap. | |
static void | operator delete (void *p) |
Free memory allocated from heap. | |
A mutex for mutual exclausion among several threads.
It is not specified whether the mutex is recursive or not. Likewise, there is no guarantee of fairness among the blocking threads.
Definition at line 96 of file thread.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Allocate memory from heap.
Definition at line 64 of file thread.hpp.
|
inlinestatic |
Free memory allocated from heap.
Definition at line 69 of file thread.hpp.