Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Zygoma::SpinLock Class Reference
[Kernel Synchronization Support]

#include <spinlock.h>

Collaboration diagram for Zygoma::SpinLock:

Collaboration graph
[legend]
List of all members.

Detailed Description

A SpinLock.

Creation of this object will block until the spin lock mutex it is being created on is available, and destruction of the object will automatically release the spin lock mutex. This provides a nice scoped locking mechanism for task synchronization primitives.

This class is implemented entirely inline since it's really just a scope control object.


Public Member Functions

 SpinLock (SpinLockMutex &mutex)
 Constructs a scoped spin lock by acquiring and holding the spin lock mutex object passed in.
 ~SpinLock ()
 Tears down the scoped spin lock by releasing the spin lock mutex object.

Protected Member Functions

 SpinLock (const SpinLock &)
SpinLockoperator= (const SpinLock &)

Protected Attributes

SpinLockMutexm_mutex


Constructor & Destructor Documentation

Zygoma::SpinLock::SpinLock SpinLockMutex mutex  )  [inline]
 

Constructs a scoped spin lock by acquiring and holding the spin lock mutex object passed in.

Parameters:
mutex A spin lock mutex object.

Here is the call graph for this function:

Zygoma::SpinLock::~SpinLock  )  [inline]
 

Tears down the scoped spin lock by releasing the spin lock mutex object.

Here is the call graph for this function:

Zygoma::SpinLock::SpinLock const SpinLock  )  [protected]
 


Member Function Documentation

SpinLock& Zygoma::SpinLock::operator= const SpinLock  )  [protected]
 


Member Data Documentation

SpinLockMutex& Zygoma::SpinLock::m_mutex [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Sep 2 10:45:11 2005 for zygoma by doxygen 1.4.2