distortos  v0.3.0
Advanced real-time operating system for deeply embedded targets
distortos Namespace Reference

Top-level namespace of distortos project. More...

Namespaces

 architecture
 Architecture-related code of distortos project.
 
 board
 Board-related code of distortos project.
 
 chip
 Chip-related code of distortos project.
 
 devices
 Device drivers.
 
 internal
 Internals of distortos project - should not be used directly!
 
 statistics
 Functions used to read statistics of distortos.
 
 test
 Functional tests of distortos project.
 
 ThisThread
 Functions that can be used to control current thread.
 

Classes

class  ConditionVariable
 ConditionVariable is an advanced synchronization primitive. More...
 
class  DynamicFifoQueue
 DynamicFifoQueue class is a variant of FifoQueue that has dynamic storage for queue's contents. More...
 
class  DynamicMessageQueue
 DynamicMessageQueue class is a variant of MessageQueue that has dynamic storage for queue's contents. More...
 
class  DynamicRawFifoQueue
 DynamicRawFifoQueue class is a variant of RawFifoQueue that has dynamic storage for queue's contents. More...
 
class  DynamicRawMessageQueue
 DynamicRawMessageQueue class is a variant of RawMessageQueue that has dynamic storage for queue's contents. More...
 
class  DynamicSignalsReceiver
 DynamicSignalsReceiver class is a templated interface for SignalsReceiver that has dynamic storage for queued signals and SignalAction associations required for catching signals. More...
 
class  DynamicThread
 DynamicThread class is a type-erased interface for thread that has dynamic storage for bound function, stack and internal DynamicSignalsReceiver object. More...
 
struct  DynamicThreadParameters
 DynamicThreadParameters struct is a helper with parameters for DynamicThread's constructor. More...
 
class  FifoQueue
 FifoQueue class is a simple FIFO queue for thread-thread, thread-interrupt or interrupt-interrupt communication. It supports multiple readers and multiple writers. It is implemented as a wrapper for internal::FifoQueueBase. More...
 
class  MessageQueue
 MessageQueue class is a message queue for thread-thread, thread-interrupt or interrupt-interrupt communication. It supports multiple readers and multiple writers. It is implemented as a wrapper for internal::MessageQueueBase. More...
 
class  Mutex
 Mutex is the basic synchronization primitive. More...
 
class  OnceFlag
 OnceFlag is a helper class for callOnce(). More...
 
class  RawFifoQueue
 RawFifoQueue class is very similar to FifoQueue, but optimized for binary serializable types (like POD types). More...
 
class  RawMessageQueue
 RawMessageQueue class is very similar to MessageQueue, but optimized for binary serializable types (like POD types). More...
 
class  Semaphore
 Semaphore is the basic synchronization primitive. More...
 
class  SignalAction
 SignalAction class contains information needed to handle signal that was caught. More...
 
class  SignalInformation
 SignalInformation class contains information about queued signal. More...
 
class  SignalInformationQueueWrapper
 SignalInformationQueueWrapper class is a container for internal::SignalInformationQueue. More...
 
class  SignalsCatcher
 SignalsCatcher class is a container for internal::SignalsCatcherControlBlock. More...
 
class  SignalSet
 SignalSet class is used as a set of signals. More...
 
class  SignalsReceiver
 SignalsReceiver class is a container for internal::SignalsReceiverControlBlock. More...
 
class  SoftwareTimer
 SoftwareTimer class is an abstract interface for software timers. More...
 
class  SoftwareTimerCommon
 SoftwareTimerCommon class implements common functionality of software timers. More...
 
class  StaticFifoQueue
 StaticFifoQueue class is a variant of FifoQueue that has automatic storage for queue's contents. More...
 
class  StaticMessageQueue
 StaticMessageQueue class is a variant of MessageQueue that has automatic storage for queue's contents. More...
 
class  StaticRawFifoQueue
 StaticRawFifoQueue class is a variant of RawFifoQueue that has automatic storage for queue's contents. More...
 
class  StaticRawMessageQueue
 StaticRawMessageQueue class is a variant of RawMessageQueue that has automatic storage for queue's contents. More...
 
class  StaticSignalsReceiver
 StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage for queued signals and SignalAction associations required for catching signals. More...
 
class  StaticSignalsReceiver< 0, 0 >
 StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage for queued signals and SignalAction associations required for catching signals. More...
 
class  StaticSignalsReceiver< 0, SignalActions >
 StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage for queued signals and SignalAction associations required for catching signals. More...
 
class  StaticSignalsReceiver< QueuedSignals, 0 >
 StaticSignalsReceiver class is a templated interface for SignalsReceiver that has automatic storage for queued signals and SignalAction associations required for catching signals. More...
 
class  StaticSoftwareTimer
 StaticSoftwareTimer class is a templated interface for software timer. More...
 
class  StaticThread
 StaticThread class is a templated interface for thread that has automatic storage for stack. More...
 
class  StaticThread< StackSize, true, QueuedSignals, SignalActions, Function, Args... >
 StaticThread class is a templated interface for thread that has automatic storage for stack and internal StaticSignalsReceiver object. More...
 
class  Thread
 Thread class is a pure abstract interface for threads. More...
 
class  ThreadCommon
 ThreadCommon class implements common functionality of threads. More...
 
class  TickClock
 TickClock is a std::chrono clock, equivalent of std::chrono::steady_clock. More...
 
class  UndetachableThread
 UndetachableThread class is a ThreadCommon that cannot be detached. More...
 

Typedefs

template<size_t ElementSize, size_t QueueSize>
using StaticRawFifoQueueFromSize = StaticRawFifoQueue< typename std::aligned_storage< ElementSize, ElementSize >::type, QueueSize >
 StaticRawFifoQueueFromSize type alias is a variant of StaticRawFifoQueue which uses size of element (instead of type) as template argument. More...
 
template<size_t ElementSize, size_t QueueSize>
using StaticRawMessageQueueFromSize = StaticRawMessageQueue< typename std::aligned_storage< ElementSize, ElementSize >::type, QueueSize >
 StaticRawMessageQueueFromSize type alias is a variant of StaticRawMessageQueue which uses size of element (instead of type) as template argument. More...
 

Enumerations

enum  SchedulingPolicy : uint8_t { SchedulingPolicy::fifo, SchedulingPolicy::roundRobin }
 scheduling policy of the thread More...
 
enum  ThreadState : uint8_t {
  ThreadState::created, ThreadState::runnable, ThreadState::terminated, ThreadState::sleeping,
  ThreadState::blockedOnSemaphore, ThreadState::suspended, ThreadState::blockedOnMutex, ThreadState::blockedOnConditionVariable,
  ThreadState::waitingForSignal, ThreadState::blockedOnOnceFlag, ThreadState::detached
}
 state of the thread More...
 

Functions

template<typename Function , typename... Args>
void callOnce (OnceFlag &onceFlag, Function &&function, Args &&... args)
 Executes the callable object exactly once, even if called from multiple threads. More...
 
template<typename Function , typename... Args>
DynamicThread makeDynamicThread (const size_t stackSize, const bool canReceiveSignals, const size_t queuedSignals, const size_t signalActions, const uint8_t priority, const SchedulingPolicy schedulingPolicy, Function &&function, Args &&... args)
 Helper factory function to make DynamicThread object. More...
 
template<typename Function , typename... Args>
DynamicThread makeDynamicThread (const DynamicThreadParameters parameters, Function &&function, Args &&... args)
 Helper factory function to make DynamicThread object. More...
 
template<typename Function , typename... Args>
DynamicThread makeAndStartDynamicThread (const size_t stackSize, const bool canReceiveSignals, const size_t queuedSignals, const size_t signalActions, const uint8_t priority, const SchedulingPolicy schedulingPolicy, Function &&function, Args &&... args)
 Helper factory function to make and start DynamicThread object. More...
 
template<typename Function , typename... Args>
DynamicThread makeAndStartDynamicThread (const DynamicThreadParameters parameters, Function &&function, Args &&... args)
 Helper factory function to make and start DynamicThread object. More...
 
template<typename Function , typename... Args>
StaticSoftwareTimer< Function, Args... > makeStaticSoftwareTimer (Function &&function, Args &&... args)
 Helper factory function to make StaticSoftwareTimer object with deduced template arguments. More...
 
template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {}, typename Function , typename... Args>
StaticThread< StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args... > makeStaticThread (const uint8_t priority, const SchedulingPolicy schedulingPolicy, Function &&function, Args &&... args)
 Helper factory function to make StaticThread object with partially deduced template arguments. More...
 
template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {}, typename Function , typename... Args>
StaticThread< StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args... > makeStaticThread (const uint8_t priority, Function &&function, Args &&... args)
 Helper factory function to make StaticThread object with partially deduced template arguments. More...
 
template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {}, typename Function , typename... Args>
StaticThread< StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args... > makeAndStartStaticThread (const uint8_t priority, const SchedulingPolicy schedulingPolicy, Function &&function, Args &&... args)
 Helper factory function to make and start StaticThread object with partially deduced template arguments. More...
 
template<size_t StackSize, bool CanReceiveSignals = {}, size_t QueuedSignals = {}, size_t SignalActions = {}, typename Function , typename... Args>
StaticThread< StackSize, CanReceiveSignals, QueuedSignals, SignalActions, Function, Args... > makeAndStartStaticThread (const uint8_t priority, Function &&function, Args &&... args)
 Helper factory function to make and start StaticThread object with partially deduced template arguments. More...
 
void PendSV_Handler ()
 PendSV_Handler() for ARMv6-M and ARMv7-M. More...
 

Detailed Description

Top-level namespace of distortos project.

Typedef Documentation

§ StaticRawFifoQueueFromSize

template<size_t ElementSize, size_t QueueSize>
using distortos::StaticRawFifoQueueFromSize = typedef StaticRawFifoQueue<typename std::aligned_storage<ElementSize, ElementSize>::type, QueueSize>

StaticRawFifoQueueFromSize type alias is a variant of StaticRawFifoQueue which uses size of element (instead of type) as template argument.

Template Parameters
ElementSizeis the size of single queue element, bytes
QueueSizeis the maximum number of elements in queue

§ StaticRawMessageQueueFromSize

template<size_t ElementSize, size_t QueueSize>
using distortos::StaticRawMessageQueueFromSize = typedef StaticRawMessageQueue<typename std::aligned_storage<ElementSize, ElementSize>::type, QueueSize>

StaticRawMessageQueueFromSize type alias is a variant of StaticRawMessageQueue which uses size of element (instead of type) as template argument.

Template Parameters
ElementSizeis the size of single queue element, bytes
QueueSizeis the maximum number of elements in queue

Function Documentation

§ PendSV_Handler()

void distortos::PendSV_Handler ( )

PendSV_Handler() for ARMv6-M and ARMv7-M.

Performs the context switch.