PFUNC 1.0
|
#include <pfunc/mutex.hpp>
Public Member Functions | |
mutex () | |
void | lock () |
bool | trylock () |
void | unlock () |
Private Attributes | |
ALIGN64 int | val |
Static Private Attributes | |
static const int | PFUNC_MUTEX_FREE = 0x0 |
static const int | PFUNC_MUTEX_LOCKED = 0x1 |
static const int | PFUNC_MUTEX_LOCKED_WITH_WAITERS = 0x2 |
static const int | PFUNC_MAX_RELAXATIONS = 2*1024*1024 |
pfunc::mutex::mutex | ( | ) | [inline] |
void pfunc::mutex::lock | ( | ) | [inline] |
Try to spin for a while first
Give up and sleep
bool pfunc::mutex::trylock | ( | ) | [inline] |
void pfunc::mutex::unlock | ( | ) | [inline] |
const int pfunc::mutex::PFUNC_MAX_RELAXATIONS = 2*1024*1024 [static, private] |
const int pfunc::mutex::PFUNC_MUTEX_FREE = 0x0 [static, private] |
const int pfunc::mutex::PFUNC_MUTEX_LOCKED = 0x1 [static, private] |
const int pfunc::mutex::PFUNC_MUTEX_LOCKED_WITH_WAITERS = 0x2 [static, private] |
ALIGN64 int pfunc::mutex::val [private] |