distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
DynamicThreadParameters.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_DYNAMICTHREADPARAMETERS_HPP_
13 #define INCLUDE_DISTORTOS_DYNAMICTHREADPARAMETERS_HPP_
14 
16 
17 #include <cstddef>
18 
19 namespace distortos
20 {
21 
33 {
48  constexpr DynamicThreadParameters(const size_t stackSizee, const bool canReceiveSignalss,
49  const size_t queuedSignalss, const size_t signalActionss, const uint8_t priorityy,
50  const SchedulingPolicy schedulingPolicyy = SchedulingPolicy::roundRobin) :
51  queuedSignals{queuedSignalss},
52  signalActions{signalActionss},
53  stackSize{stackSizee},
54  canReceiveSignals{canReceiveSignalss},
55  priority{priorityy},
56  schedulingPolicy{schedulingPolicyy}
57  {
58 
59  }
60 
69  constexpr DynamicThreadParameters(const size_t stackSizee, const uint8_t priorityy,
70  const SchedulingPolicy schedulingPolicyy = SchedulingPolicy::roundRobin) :
71  DynamicThreadParameters{stackSizee, false, 0, 0, priorityy, schedulingPolicyy}
72  {
73 
74  }
75 
78  size_t queuedSignals;
79 
82  size_t signalActions;
83 
85  size_t stackSize;
86 
89 
91  uint8_t priority;
92 
95 };
96 
97 } // namespace distortos
98 
99 #endif // INCLUDE_DISTORTOS_DYNAMICTHREADPARAMETERS_HPP_
size_t queuedSignals
Definition: DynamicThreadParameters.hpp:78
SchedulingPolicy schedulingPolicy
scheduling policy of the thread
Definition: DynamicThreadParameters.hpp:94
size_t stackSize
size of stack, bytes
Definition: DynamicThreadParameters.hpp:85
SchedulingPolicy
scheduling policy of the thread
Definition: SchedulingPolicy.hpp:26
uint8_t priority
thread&#39;s priority, 0 - lowest, UINT8_MAX - highest
Definition: DynamicThreadParameters.hpp:91
bool canReceiveSignals
selects whether reception of signals is enabled (true) or disabled (false) for this thread ...
Definition: DynamicThreadParameters.hpp:88
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&#39;s constructor.
Definition: DynamicThreadParameters.hpp:48
Top-level namespace of distortos project.
DynamicThreadParameters struct is a helper with parameters for DynamicThread&#39;s constructor.
Definition: DynamicThreadParameters.hpp:32
constexpr DynamicThreadParameters(const size_t stackSizee, const uint8_t priorityy, const SchedulingPolicy schedulingPolicyy=SchedulingPolicy::roundRobin)
DynamicThreadParameters&#39;s constructor.
Definition: DynamicThreadParameters.hpp:69
size_t signalActions
Definition: DynamicThreadParameters.hpp:82
round-robin scheduling policy
SchedulingPolicy enum class header.