#include <spinlock.h>
Collaboration diagram for Zygoma::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 &) | |
SpinLock & | operator= (const SpinLock &) |
Protected Attributes | |
SpinLockMutex & | m_mutex |
|
Constructs a scoped spin lock by acquiring and holding the spin lock mutex object passed in.
Here is the call graph for this function: |
|
Tears down the scoped spin lock by releasing the spin lock mutex object.
Here is the call graph for this function: |
|
|
|
|
|
|