MADNESS 0.10.1
|
Mutex using pthread mutex operations. More...
#include <worldmutex.h>
Public Member Functions | |
Mutex (int junk=0) | |
Make and initialize a mutex ... initial state is unlocked. | |
virtual | ~Mutex () |
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 | |
Mutex (const Mutex &) | |
Copy constructor is forbidden. | |
void | operator= (const Mutex &) |
Assignment is forbidden. | |
Private Attributes | |
pthread_mutex_t | mutex |
Mutex using pthread mutex operations.
|
private |
Copy constructor is forbidden.
|
inline |
Make and initialize a mutex ... initial state is unlocked.
References MADNESS_EXCEPTION, and mutex.
|
inlinevirtual |
References mutex.
|
inline |
Acquire the mutex waiting if necessary.
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
Referenced by madness::WorldAmInterface::WorldAmInterface(), madness::FunctionImpl< T, NDIM >::do_dot_localX(), madness::FunctionImpl< T, NDIM >::do_inner_localX(), and madness::WorldAmInterface::send().
|
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.
Referenced by madness::WorldAmInterface::free_managed_buffers(), madness::WorldAmInterface::send(), and madness::try_two_locks().
|
inline |
Free a mutex owned by this thread.
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
Referenced by madness::WorldAmInterface::WorldAmInterface(), madness::FunctionImpl< T, NDIM >::do_dot_localX(), madness::FunctionImpl< T, NDIM >::do_inner_localX(), madness::WorldAmInterface::send(), and madness::try_two_locks().
|
mutableprivate |