|
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. | |
| ~RecursiveMutex () | |
| void | lock () const |
| Acquire the mutex waiting if necessary. | |
| pthread_mutex_t * | ptr () const |
| Return a pointer to the pthread mutex for use by a condition variable. | |
| bool | try_lock () const |
| Try to acquire the mutex ... return true on success, false on failure. | |
| void | unlock () const |
| Free a mutex owned by this thread. | |
Private Member Functions | |
| RecursiveMutex (const RecursiveMutex &) | |
| Copy constructor is forbidden. | |
| void | operator= (const RecursiveMutex &) |
| Assignment is forbidden. | |
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, mutex, and madness::nonlinear_vector_solver().
|
inline |
References mutex, and madness::nonlinear_vector_solver().
|
inline |
Acquire the mutex waiting if necessary.
References MADNESS_EXCEPTION, mutex, madness::nonlinear_vector_solver(), and madness::detail::print_mutex_error().
Referenced by madness::detail::DeferredCleanup::destroy(), 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, and madness::nonlinear_vector_solver().
|
inline |
Free a mutex owned by this thread.
References MADNESS_EXCEPTION, mutex, madness::nonlinear_vector_solver(), and madness::detail::print_mutex_error().
Referenced by madness::detail::DeferredCleanup::destroy(), madness::detail::DeferredCleanup::destroy(), and madness::detail::DeferredCleanup::do_cleanup().
|
mutableprivate |
Referenced by RecursiveMutex(), ~RecursiveMutex(), lock(), ptr(), try_lock(), and unlock().