riot Namespace Reference

RIOT C++ namespace. More...

Detailed Description

RIOT C++ namespace.

Namespaces

 testing
 namespace for cpp unit tests
 

Data Structures

class  time_point
 A time point for timed wait, as clocks from the standard are not available on RIOT. 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...
 
class  mutex
 C++11 compliant implementation of mutex, 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...
 
struct  try_to_lock_t
 Tag type for try lock strategy. More...
 
struct  adopt_lock_t
 Tag type for adopt lock strategy. More...
 
class  lock_guard
 C++11 compliant implementation of unique lock. More...
 
class  unique_lock
 C++11 compliant implementation of unique lock. 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  thread
 C++11 compliant implementation of thread, however uses the time point from out chrono header instead of the specified one. More...
 
class  irq_lock
 RAII based IRQ lock. More...
 

Enumerations

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

Functions

time_point now ()
 Returns the current time saved in a time point. More...
 
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. More...
 
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. More...
 

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.
 

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.

◆ 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.