mutex.hpp File Reference

C++11 mutex drop in replacement. More...

Detailed Description

C++11 mutex drop in replacement.

See also
std::mutex, std::lock_guard and std::unique_lock
Author
Raphael Hiesgen <raphael.hiesgen (at) haw-hamburg.de>

Definition in file mutex.hpp.

#include "mutex.h"
#include <utility>
#include <stdexcept>
#include <system_error>
+ Include dependency graph for mutex.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  riot::mutex
 C++11 compliant implementation of mutex, uses the time point implemented in our chrono replacement instead of the specified one. More...
 
struct  riot::defer_lock_t
 Tag type for defer lock strategy. More...
 
struct  riot::try_to_lock_t
 Tag type for try lock strategy. More...
 
struct  riot::adopt_lock_t
 Tag type for adopt lock strategy. More...
 
class  riot::lock_guard< Mutex >
 C++11 compliant implementation of unique lock. More...
 
class  riot::unique_lock< Mutex >
 C++11 compliant implementation of unique lock. More...
 

Functions

template<class Mutex >
void riot::swap (unique_lock< Mutex > &lhs, unique_lock< Mutex > &rhs) noexcept
 Swaps two mutexes. More...
 

Variables

constexpr defer_lock_t riot::defer_lock = defer_lock_t()
 Tag constant for defer lock strategy.
 
constexpr try_to_lock_t riot::try_to_lock = try_to_lock_t()
 Tag constant for try lock strategy.
 
constexpr adopt_lock_t riot::adopt_lock = adopt_lock_t()
 Tag constant for adopt lock strategy.
 

Function Documentation

◆ swap()

template<class Mutex >
void riot::swap ( unique_lock< Mutex > &  lhs,
unique_lock< Mutex > &  rhs 
)
inlinenoexcept

Swaps two mutexes.

Parameters
[in,out]lhsReference to one mutex.
[in,out]rhsReference to the other mutex.

Definition at line 309 of file mutex.hpp.