Loading...
Searching...
No Matches
riot::lock_guard< Mutex > Class Template Reference

C++11 compliant implementation of unique lock. More...

Detailed Description

template<class Mutex>
class riot::lock_guard< Mutex >

C++11 compliant implementation of unique lock.

See also
std::lock_guard

Definition at line 113 of file mutex.hpp.

#include <mutex.hpp>

Public Types

using mutex_type = Mutex
 The type of Mutex used by the lock_guard.
 

Public Member Functions

 lock_guard (mutex_type &mtx)
 Constructs a lock_gurad from a Mutex and locks it.
 
 lock_guard (mutex_type &mtx, adopt_lock_t)
 Constructs a lock_guard from a Mutex, acquireing ownership without locking it.
 

Member Typedef Documentation

◆ mutex_type

template<class Mutex >
using riot::lock_guard< Mutex >::mutex_type = Mutex

The type of Mutex used by the lock_guard.

Definition at line 118 of file mutex.hpp.

Constructor & Destructor Documentation

◆ lock_guard() [1/2]

template<class Mutex >
riot::lock_guard< Mutex >::lock_guard ( mutex_type mtx)
inlineexplicit

Constructs a lock_gurad from a Mutex and locks it.

Definition at line 123 of file mutex.hpp.

◆ lock_guard() [2/2]

template<class Mutex >
riot::lock_guard< Mutex >::lock_guard ( mutex_type mtx,
adopt_lock_t   
)
inline

Constructs a lock_guard from a Mutex, acquireing ownership without locking it.

Definition at line 128 of file mutex.hpp.

◆ ~lock_guard()

template<class Mutex >
riot::lock_guard< Mutex >::~lock_guard ( )
inline

Definition at line 129 of file mutex.hpp.


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