Public Member Functions | Private Attributes | List of all members
icl_core::thread::ScopedSpinLock Class Reference

#include <ScopedSpinLock.h>

Inheritance diagram for icl_core::thread::ScopedSpinLock:
Inheritance graph
[legend]

Public Member Functions

bool isLocked () const
 
 operator bool () const
 Implicit conversion to bool (always true). More...
 
 ScopedSpinLock (SpinLock &spinlock)
 
 ~ScopedSpinLock ()
 Unlocks the spinlock. More...
 

Private Attributes

SpinLockm_spinlock
 

Additional Inherited Members

- Protected Member Functions inherited from icl_core::Noncopyable
 Noncopyable ()
 
virtual ~Noncopyable ()
 

Detailed Description

Definition at line 31 of file ScopedSpinLock.h.

Constructor & Destructor Documentation

icl_core::thread::ScopedSpinLock::ScopedSpinLock ( SpinLock spinlock)
inlineexplicit

Locks the spinlock.

Parameters
spinlockThe 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.

Member Function Documentation

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.

Member Data Documentation

SpinLock& icl_core::thread::ScopedSpinLock::m_spinlock
private

Definition at line 58 of file ScopedSpinLock.h.


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


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59