MADNESS
version 0.9
|
Spinlock using pthread spinlock operations. More...
#include <worldmutex.h>
Public Member Functions | |
Spinlock (int junk=0) | |
Make and initialize a spinlock ... initial state is unlocked. More... | |
bool | try_lock () const |
Try to acquire the spinlock ... return true on success, false on failure. More... | |
void | lock () const |
Acquire the spinlock waiting if necessary. More... | |
void | unlock () const |
Free a spinlock owned by this thread. More... | |
virtual | ~Spinlock () |
Spinlock using pthread spinlock operations.
|
inline |
Make and initialize a spinlock ... initial state is unlocked.
|
inlinevirtual |
|
inline |
Acquire the spinlock waiting if necessary.
References MADNESS_EXCEPTION.
Referenced by madness::Hash_private::bin< keyT, valueT >::clear(), madness::Hash_private::bin< keyT, valueT >::del(), madness::Hash_private::bin< keyT, valueT >::find(), madness::Hash_private::bin< keyT, valueT >::insert(), madness::MutexFair::lock(), madness::WorldObject< DerivativeBase< T, NDIM > >::process_pending(), madness::MutexFair::try_lock(), madness::MutexFair::unlock(), and madness::ConditionVariable::wait().
|
inline |
Try to acquire the spinlock ... return true on success, false on failure.
Referenced by madness::MutexReaderWriter::lock().
|
inline |
Free a spinlock owned by this thread.
References MADNESS_EXCEPTION.
Referenced by madness::Hash_private::bin< keyT, valueT >::clear(), madness::Hash_private::bin< keyT, valueT >::del(), madness::Hash_private::bin< keyT, valueT >::find(), madness::Hash_private::bin< keyT, valueT >::insert(), madness::MutexFair::lock(), madness::WorldObject< DerivativeBase< T, NDIM > >::process_pending(), madness::MutexFair::try_lock(), madness::MutexFair::unlock(), and madness::ConditionVariable::wait().