distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
MainThread class is a Thread for main() More...
Public Member Functions | |
MainThread (const uint8_t priority, ThreadGroupControlBlock &threadGroupControlBlock, SignalsReceiver *const signalsReceiver) | |
MainThread's constructor. More... | |
![]() | |
int | detach () override |
Detaches the thread. More... | |
![]() | |
ThreadCommon (Stack &&stack, uint8_t priority, SchedulingPolicy schedulingPolicy, ThreadGroupControlBlock *threadGroupControlBlock, SignalsReceiver *signalsReceiver) | |
ThreadCommon's constructor. More... | |
~ThreadCommon () override | |
ThreadCommon's destructor. More... | |
int | generateSignal (uint8_t signalNumber) override |
Generates signal for thread. More... | |
uint8_t | getEffectivePriority () const override |
ThreadIdentifier | getIdentifier () const override |
SignalSet | getPendingSignalSet () const override |
Gets set of currently pending signals. More... | |
uint8_t | getPriority () const override |
SchedulingPolicy | getSchedulingPolicy () const override |
size_t | getStackHighWaterMark () const override |
size_t | getStackSize () const override |
ThreadState | getState () const override |
int | join () override |
Waits for thread termination. More... | |
int | queueSignal (uint8_t signalNumber, sigval value) override |
Queues signal for thread. More... | |
void | setPriority (uint8_t priority, bool alwaysBehind={}) override |
Changes priority of thread. More... | |
void | setSchedulingPolicy (SchedulingPolicy schedulingPolicy) override |
ThreadCommon (const ThreadCommon &)=delete | |
ThreadCommon (ThreadCommon &&)=default | |
const ThreadCommon & | operator= (const ThreadCommon &)=delete |
ThreadCommon & | operator= (ThreadCommon &&)=delete |
![]() | |
virtual | ~Thread ()=default |
Thread's destructor. More... | |
Static Public Member Functions | |
static void | lowLevelInitializer () |
Low-level initializer of main() thread and scheduler. More... | |
Protected Member Functions | |
void | run () override |
Thread's "run" function. More... | |
![]() | |
void | exit0Hook () override |
Thread's "exit 0" hook function. More... | |
void | exit1Hook () override |
Thread's "exit 1" hook function. More... | |
ThreadControlBlock & | getThreadControlBlock () |
const ThreadControlBlock & | getThreadControlBlock () const |
int | startInternal () |
Starts the thread. More... | |
Additional Inherited Members | |
![]() | |
using | StackStorageUniquePointer = Stack::StorageUniquePointer |
unique_ptr (with deleter) to storage for stack More... | |
MainThread class is a Thread for main()
|
inline |
MainThread's constructor.
[in] | priority | is the thread's priority, 0 - lowest, UINT8_MAX - highest |
[in] | threadGroupControlBlock | is a reference to ThreadGroupControlBlock to which this object will be added |
[in] | signalsReceiver | is a pointer to SignalsReceiver object for main thread, nullptr to disable reception of signals for main thread |
|
static |
Low-level initializer of main() thread and scheduler.
This function is called before constructors for global and static objects via BIND_LOW_LEVEL_INITIALIZER().
|
inlineoverrideprotectedvirtual |
Thread's "run" function.
Implements distortos::internal::RunnableThread.