MADNESS
0.10.1
|
Recursive mutex using pthread mutex operations. More...
#include <worldmutex.h>
Public Member Functions | |
RecursiveMutex () | |
Make and initialize a mutex ... initial state is unlocked. More... | |
~RecursiveMutex () | |
void | lock () const |
Acquire the mutex waiting if necessary. More... | |
pthread_mutex_t * | ptr () const |
Return a pointer to the pthread mutex for use by a condition variable. More... | |
bool | try_lock () const |
Try to acquire the mutex ... return true on success, false on failure. More... | |
void | unlock () const |
Free a mutex owned by this thread. More... | |
Private Member Functions | |
RecursiveMutex (const RecursiveMutex &) | |
Copy constructor is forbidden. More... | |
void | operator= (const RecursiveMutex &) |
Assignment is forbidden. More... | |
Private Attributes | |
pthread_mutex_t | mutex |
Recursive mutex using pthread mutex operations.
|
private |
Copy constructor is forbidden.
madness::RecursiveMutex::RecursiveMutex | ( | ) |
Make and initialize a mutex ... initial state is unlocked.
References MADNESS_EXCEPTION, and mutex.
|
inline |
References mutex.
|
inline |
Acquire the mutex waiting if necessary.
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
Referenced by madness::detail::DeferredCleanup::destroy(), and madness::detail::DeferredCleanup::do_cleanup().
|
private |
Assignment is forbidden.
|
inline |
Return a pointer to the pthread mutex for use by a condition variable.
References mutex.
|
inline |
Try to acquire the mutex ... return true on success, false on failure.
References mutex.
|
inline |
Free a mutex owned by this thread.
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
Referenced by madness::detail::DeferredCleanup::destroy(), and madness::detail::DeferredCleanup::do_cleanup().
|
mutableprivate |
Referenced by RecursiveMutex(), ~RecursiveMutex(), lock(), ptr(), try_lock(), and unlock().