distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::DynamicThreadParameters Struct Reference

DynamicThreadParameters struct is a helper with parameters for DynamicThread's constructor. More...

#include "distortos/DynamicThreadParameters.hpp"

Public Member Functions

constexpr DynamicThreadParameters (const size_t stackSizee, const bool canReceiveSignalss, const size_t queuedSignalss, const size_t signalActionss, const uint8_t priorityy, const SchedulingPolicy schedulingPolicyy=SchedulingPolicy::roundRobin)
 DynamicThreadParameters's constructor. More...
 
constexpr DynamicThreadParameters (const size_t stackSizee, const uint8_t priorityy, const SchedulingPolicy schedulingPolicyy=SchedulingPolicy::roundRobin)
 DynamicThreadParameters's constructor. More...
 

Public Attributes

size_t queuedSignals
 
size_t signalActions
 
size_t stackSize
 size of stack, bytes More...
 
bool canReceiveSignals
 selects whether reception of signals is enabled (true) or disabled (false) for this thread More...
 
uint8_t priority
 thread's priority, 0 - lowest, UINT8_MAX - highest More...
 
SchedulingPolicy schedulingPolicy
 scheduling policy of the thread More...
 

Detailed Description

DynamicThreadParameters struct is a helper with parameters for DynamicThread's constructor.

This struct is a replacement for overloads of DynamicThread's constructor, makeDynamicThread() and makeAndStartDynamicThread() which - unfortunately - cannot be used, as they would lead to compilation errors due to ambiguity.

Constructor & Destructor Documentation

◆ DynamicThreadParameters() [1/2]

constexpr distortos::DynamicThreadParameters::DynamicThreadParameters ( const size_t  stackSizee,
const bool  canReceiveSignalss,
const size_t  queuedSignalss,
const size_t  signalActionss,
const uint8_t  priorityy,
const SchedulingPolicy  schedulingPolicyy = SchedulingPolicy::roundRobin 
)
inline

DynamicThreadParameters's constructor.

Parameters
[in]stackSizeeis the size of stack, bytes
[in]canReceiveSignalssselects whether reception of signals is enabled (true) or disabled (false) for this thread
[in]queuedSignalssis the max number of queued signals for this thread, relevant only if canReceiveSignals == true, 0 to disable queuing of signals for this thread
[in]signalActionssis the max number of different SignalAction objects for this thread, relevant only if canReceiveSignals == true, 0 to disable catching of signals for this thread
[in]priorityyis the thread's priority, 0 - lowest, UINT8_MAX - highest
[in]schedulingPolicyyis the scheduling policy of the thread, default - SchedulingPolicy::roundRobin

◆ DynamicThreadParameters() [2/2]

constexpr distortos::DynamicThreadParameters::DynamicThreadParameters ( const size_t  stackSizee,
const uint8_t  priorityy,
const SchedulingPolicy  schedulingPolicyy = SchedulingPolicy::roundRobin 
)
inline

DynamicThreadParameters's constructor.

Parameters
[in]stackSizeeis the size of stack, bytes
[in]priorityyis the thread's priority, 0 - lowest, UINT8_MAX - highest
[in]schedulingPolicyyis the scheduling policy of the thread, default - SchedulingPolicy::roundRobin

Member Data Documentation

◆ canReceiveSignals

bool distortos::DynamicThreadParameters::canReceiveSignals

selects whether reception of signals is enabled (true) or disabled (false) for this thread

◆ priority

uint8_t distortos::DynamicThreadParameters::priority

thread's priority, 0 - lowest, UINT8_MAX - highest

◆ queuedSignals

size_t distortos::DynamicThreadParameters::queuedSignals

max number of queued signals for this thread, relevant only if canReceiveSignals == true, 0 to disable queuing of signals for this thread

◆ schedulingPolicy

SchedulingPolicy distortos::DynamicThreadParameters::schedulingPolicy

scheduling policy of the thread

◆ signalActions

size_t distortos::DynamicThreadParameters::signalActions

max number of different SignalAction objects for this thread, relevant only if canReceiveSignals == true, 0 to disable catching of signals for this thread

◆ stackSize

size_t distortos::DynamicThreadParameters::stackSize

size of stack, bytes


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