Generated on Fri Mar 20 15:57:12 2015 for Gecode by doxygen 1.6.3

Gecode::Support::Mutex Class Reference
[Simple thread and synchronization support]

A mutex for mutual exclausion among several threads. More...

#include <thread.hpp>

List of all members.

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.

Detailed Description

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 99 of file thread.hpp.


Constructor & Destructor Documentation

Gecode::Support::Mutex::Mutex ( void   )  [inline]

Initialize mutex.

Definition at line 44 of file none.hpp.

Gecode::Support::Mutex::~Mutex ( void   )  [inline]

Delete mutex.

Definition at line 54 of file none.hpp.


Member Function Documentation

void Gecode::Support::Mutex::acquire ( void   )  [inline]

Acquire the mutex and possibly block.

Definition at line 46 of file none.hpp.

bool Gecode::Support::Mutex::tryacquire ( void   )  [inline]

Try to acquire the mutex, return true if succesful.

Definition at line 48 of file none.hpp.

void Gecode::Support::Mutex::release ( void   )  [inline]

Release the mutex.

Definition at line 52 of file none.hpp.

void * Gecode::Support::Mutex::operator new ( size_t  s  )  [inline, static]

Allocate memory from heap.

Definition at line 58 of file thread.hpp.

void Gecode::Support::Mutex::operator delete ( void *  p  )  [inline, static]

Free memory allocated from heap.

Definition at line 63 of file thread.hpp.


The documentation for this class was generated from the following files: