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. More... | |
virtual | ~Mutex () |
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 | |
Mutex (const Mutex &) | |
Copy constructor is forbidden. More... | |
void | operator= (const Mutex &) |
Assignment is forbidden. More... | |
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_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_inner_localX(), madness::WorldAmInterface::send(), and madness::try_two_locks().
|
mutableprivate |