#include <ScopedSpinLock.h>
Public Member Functions | |
bool | isLocked () const |
operator bool () const | |
Implicit conversion to bool (always true). | |
ScopedSpinLock (SpinLock &spinlock) | |
~ScopedSpinLock () | |
Unlocks the spinlock. | |
Private Attributes | |
SpinLock & | m_spinlock |
Definition at line 31 of file ScopedSpinLock.h.
icl_core::thread::ScopedSpinLock::ScopedSpinLock | ( | SpinLock & | spinlock | ) | [inline, explicit] |
Locks the spinlock.
spinlock | The spinlock to use. |
Definition at line 37 of file ScopedSpinLock.h.
icl_core::thread::ScopedSpinLock::~ScopedSpinLock | ( | ) | [inline] |
Unlocks the spinlock.
Definition at line 44 of file ScopedSpinLock.h.
bool icl_core::thread::ScopedSpinLock::isLocked | ( | ) | const [inline] |
Check if the spinlock has been successfully locked (always true since this class guarantees that the lock is held).
Definition at line 52 of file ScopedSpinLock.h.
icl_core::thread::ScopedSpinLock::operator bool | ( | ) | const [inline] |
Implicit conversion to bool (always true).
Definition at line 55 of file ScopedSpinLock.h.
Definition at line 58 of file ScopedSpinLock.h.