Loading...
Searching...
No Matches
riot Namespace Reference

RIOT C++ namespace. More...

Detailed Description

RIOT C++ namespace.

Namespaces

namespace  testing
 namespace for cpp unit tests
 

Data Structures

struct  adopt_lock_t
 Tag type for adopt lock strategy. More...
 
class  condition_variable
 C++11 compliant implementation of condition variable, uses the time point implemented in our chrono replacement instead of the specified one. More...
 
struct  defer_lock_t
 Tag type for defer lock strategy. More...
 
class  irq_lock
 RAII based IRQ lock. More...
 
class  lock_guard
 C++11 compliant implementation of unique lock. More...
 
class  mutex
 C++11 compliant implementation of mutex, uses the time point implemented in our chrono replacement instead of the specified one. More...
 
class  thread
 C++11 compliant implementation of thread, however uses the time point from out chrono header instead of the specified one. More...
 
struct  thread_data
 Holds context data for the thread. More...
 
struct  thread_data_deleter
 This deleter prevents our thread data from being destroyed if the thread object is destroyed before the thread had a chance to run. More...
 
class  thread_id
 implementation of thread::id More...
 
class  time_point
 A time point for timed wait, as clocks from the standard are not available on RIOT. More...
 
struct  try_to_lock_t
 Tag type for try lock strategy. More...
 
class  unique_lock
 C++11 compliant implementation of unique lock. More...
 

Enumerations

enum class  cv_status { no_timeout , timeout }
 Status for timeout-based calls of the condition variable. More...
 

Functions

time_point now ()
 Returns the current time saved in a time point.
 
bool operator< (const time_point &lhs, const time_point &rhs)
 Compares two timepoints.
 
bool operator> (const time_point &lhs, const time_point &rhs)
 Compares two timepoints.
 
bool operator<= (const time_point &lhs, const time_point &rhs)
 Compares two timepoints.
 
bool operator>= (const time_point &lhs, const time_point &rhs)
 Compare two timepoints.
 
template<class Mutex >
void swap (unique_lock< Mutex > &lhs, unique_lock< Mutex > &rhs) noexcept
 Swaps two mutexes.
 
template<class T , class Traits >
std::basic_ostream< T, Traits > & operator<< (std::basic_ostream< T, Traits > &out, thread_id id)
 Enable printing of thread ids using output streams.
 
void swap (thread &lhs, thread &rhs) noexcept
 Swaps two threads.
 

Variables

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

Enumeration Type Documentation

◆ cv_status

enum class riot::cv_status
strong

Status for timeout-based calls of the condition variable.

Definition at line 39 of file condition_variable.hpp.

Function Documentation

◆ now()

time_point riot::now ( )
inline

Returns the current time saved in a time point.

Returns
time_point containing the current time.

Definition at line 104 of file chrono.hpp.

◆ operator<()

bool riot::operator< ( const time_point lhs,
const time_point rhs 
)
inline

Compares two timepoints.

Definition at line 113 of file chrono.hpp.

◆ operator<<()

template<class T , class Traits >
std::basic_ostream< T, Traits > & riot::operator<< ( std::basic_ostream< T, Traits > &  out,
thread_id  id 
)
inline

Enable printing of thread ids using output streams.

Definition at line 1 of file thread.hpp.

◆ operator<=()

bool riot::operator<= ( const time_point lhs,
const time_point rhs 
)
inline

Compares two timepoints.

Definition at line 129 of file chrono.hpp.

◆ operator>()

bool riot::operator> ( const time_point lhs,
const time_point rhs 
)
inline

Compares two timepoints.

Definition at line 122 of file chrono.hpp.

◆ operator>=()

bool riot::operator>= ( const time_point lhs,
const time_point rhs 
)
inline

Compare two timepoints.

Definition at line 136 of file chrono.hpp.

◆ swap() [1/2]

void riot::swap ( thread lhs,
thread rhs 
)
inlinenoexcept

Swaps two threads.

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

Definition at line 371 of file thread.hpp.

◆ swap() [2/2]

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.

Variable Documentation

◆ adopt_lock

constexpr adopt_lock_t riot::adopt_lock = adopt_lock_t()
constexpr

Tag constant for adopt lock strategy.

Definition at line 104 of file mutex.hpp.

◆ defer_lock

constexpr defer_lock_t riot::defer_lock = defer_lock_t()
constexpr

Tag constant for defer lock strategy.

Definition at line 96 of file mutex.hpp.

◆ try_to_lock

constexpr try_to_lock_t riot::try_to_lock = try_to_lock_t()
constexpr

Tag constant for try lock strategy.

Definition at line 100 of file mutex.hpp.