distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::MainThread Class Reference

MainThread class is a Thread for main() More...

#include <MainThread.hpp>

Inheritance diagram for distortos::internal::MainThread:
Collaboration diagram for distortos::internal::MainThread:

Public Member Functions

 MainThread (uint8_t priority, ThreadGroupControlBlock &threadGroupControlBlock, SignalsReceiver *signalsReceiver)
 MainThread's constructor. More...
- Public Member Functions inherited from distortos::UndetachableThread
int detach () override
 Detaches the thread. More...
- Public Member Functions inherited from distortos::ThreadCommon
 ThreadCommon (internal::Stack &&stack, uint8_t priority, SchedulingPolicy schedulingPolicy, internal::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
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 ThreadCommonoperator= (const ThreadCommon &)=delete
ThreadCommonoperator= (ThreadCommon &&)=delete
- Public Member Functions inherited from distortos::Thread
virtual ~Thread ()=0
 Thread's destructor. More...

Additional Inherited Members

- Public Types inherited from distortos::ThreadCommon
using StackStorageUniquePointer = internal::Stack::StorageUniquePointer
 unique_ptr (with deleter) to storage for stack More...
- Protected Member Functions inherited from distortos::ThreadCommon
internal::ThreadControlBlockgetThreadControlBlock ()
const internal::ThreadControlBlockgetThreadControlBlock () const
int startInternal (void(&runFunction)(Thread &), void(*preTerminationHookFunction)(Thread &), void(&terminationHookFunction)(Thread &))
 Starts the thread. More...
- Static Protected Member Functions inherited from distortos::ThreadCommon
static void terminationHook (Thread &thread)
 Termination hook function of thread. More...

Detailed Description

MainThread class is a Thread for main()

Constructor & Destructor Documentation

◆ MainThread()

distortos::internal::MainThread::MainThread ( uint8_t  priority,
ThreadGroupControlBlock threadGroupControlBlock,
SignalsReceiver signalsReceiver 

MainThread's constructor.

[in]priorityis the thread's priority, 0 - lowest, UINT8_MAX - highest
[in]threadGroupControlBlockis a reference to ThreadGroupControlBlock to which this object will be added
[in]signalsReceiveris a pointer to SignalsReceiver object for main thread, nullptr to disable reception of signals for main thread
Here is the call graph for this function:

The documentation for this class was generated from the following files: