MADNESS  version 0.9
Public Member Functions | List of all members
madness::Mutex Class Reference

Mutex using pthread mutex operations. More...

#include <worldmutex.h>

Inheritance diagram for madness::Mutex:
Inheritance graph
[legend]

Public Member Functions

 Mutex (int junk=0)
 Make and initialize a mutex ... initial state is unlocked. More...
 
bool try_lock () const
 Try to acquire the mutex ... return true on success, false on failure. More...
 
void lock () const
 Acquire the mutex waiting if necessary. More...
 
void unlock () const
 Free a mutex owned by this thread. More...
 
pthread_mutex_t * ptr () const
 Return a pointer to the pthread mutex for use by a condition variable. More...
 
virtual ~Mutex ()
 

Detailed Description

Mutex using pthread mutex operations.

Constructor & Destructor Documentation

madness::Mutex::Mutex ( int  junk = 0)
inline

Make and initialize a mutex ... initial state is unlocked.

References MADNESS_EXCEPTION.

virtual madness::Mutex::~Mutex ( )
inlinevirtual

Member Function Documentation

void madness::Mutex::lock ( ) const
inline

Acquire the mutex waiting if necessary.

References MADNESS_EXCEPTION.

Referenced by madness::WorldAmInterface::free_managed_buffers(), and madness::WorldAmInterface::WorldAmInterface().

pthread_mutex_t* madness::Mutex::ptr ( ) const
inline

Return a pointer to the pthread mutex for use by a condition variable.

bool madness::Mutex::try_lock ( ) const
inline

Try to acquire the mutex ... return true on success, false on failure.

Referenced by madness::try_two_locks().

void madness::Mutex::unlock ( ) const
inline

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