PFUNC 1.0
Public Member Functions | Private Attributes | Static Private Attributes
pfunc::mutex Struct Reference

#include <pfunc/mutex.hpp>

Inheritance diagram for pfunc::mutex:
pfunc::detail::no_copy

List of all members.

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

Constructor & Destructor Documentation

pfunc::mutex::mutex ( ) [inline]

Member Function Documentation

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]

Member Data Documentation

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]

The documentation for this struct was generated from the following file: