MADNESS  version 0.9
Public Member Functions | List of all members
madness::Spinlock Class Reference

Spinlock using pthread spinlock operations. More...

#include <worldmutex.h>

Inheritance diagram for madness::Spinlock:
Inheritance graph
[legend]

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 ()
 

Detailed Description

Spinlock using pthread spinlock operations.

Constructor & Destructor Documentation

madness::Spinlock::Spinlock ( int  junk = 0)
inline

Make and initialize a spinlock ... initial state is unlocked.

virtual madness::Spinlock::~Spinlock ( )
inlinevirtual

Member Function Documentation

void madness::Spinlock::lock ( ) const
inline
bool madness::Spinlock::try_lock ( ) const
inline

Try to acquire the spinlock ... return true on success, false on failure.

Referenced by madness::MutexReaderWriter::lock().

void madness::Spinlock::unlock ( ) const
inline

The documentation for this class was generated from the following file: