distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
RunnableThread class defines additional interface functions required for the thread to be actually runnable. More...
#include "distortos/internal/scheduler/RunnableThread.hpp"
Protected Member Functions | |
virtual void | exit0Hook ()=0 |
Thread's "exit 0" hook function. More... | |
virtual void | exit1Hook ()=0 |
Thread's "exit 1" hook function. More... | |
virtual void | run ()=0 |
Thread's "run" function. More... | |
Friends | |
void | threadExiter (RunnableThread &) |
Thread "exiter" function. More... | |
void | threadRunner (RunnableThread &) |
Thread runner function - entry point of threads. More... | |
Additional Inherited Members | |
Public Member Functions inherited from distortos::Thread | |
virtual | ~Thread ()=default |
Thread's destructor. More... | |
virtual int | detach ()=0 |
Detaches the thread. More... | |
virtual int | generateSignal (uint8_t signalNumber)=0 |
Generates signal for thread. More... | |
virtual uint8_t | getEffectivePriority () const =0 |
virtual ThreadIdentifier | getIdentifier () const =0 |
virtual SignalSet | getPendingSignalSet () const =0 |
Gets set of currently pending signals. More... | |
virtual uint8_t | getPriority () const =0 |
virtual SchedulingPolicy | getSchedulingPolicy () const =0 |
virtual size_t | getStackHighWaterMark () const =0 |
virtual size_t | getStackSize () const =0 |
virtual ThreadState | getState () const =0 |
virtual int | join ()=0 |
Waits for thread termination. More... | |
virtual int | queueSignal (uint8_t signalNumber, sigval value)=0 |
Queues signal for thread. More... | |
virtual void | setPriority (uint8_t priority, bool alwaysBehind={})=0 |
Changes priority of thread. More... | |
virtual void | setSchedulingPolicy (SchedulingPolicy schedulingPolicy)=0 |
RunnableThread class defines additional interface functions required for the thread to be actually runnable.
|
protectedpure virtual |
Thread's "exit 0" hook function.
This hook will be called early during thread's exit - while the thread is still runnable.
Implemented in distortos::internal::ThreadCommon, and distortos::internal::DynamicThreadBase.
|
protectedpure virtual |
Thread's "exit 1" hook function.
This hook will be called late during thread's exit - after the thread is removed from the scheduler.
Implemented in distortos::internal::ThreadCommon, and distortos::internal::DynamicThreadBase.
|
protectedpure virtual |
Thread's "run" function.
Implemented in distortos::internal::DynamicThreadBase, distortos::internal::anonymous_namespace{MainThread.cpp}::MainThread, distortos::internal::StaticThreadBase< StackSize, Function, Args >, and distortos::internal::StaticThreadBase< StackSize, Function, Args... >.
|
friend |
Thread "exiter" function.
Performs following actions:
This function never returns.
[in] | runnableThread | is a reference to RunnableThread object that is being exited |
|
friend |
Thread runner function - entry point of threads.
Performs following actions:
This function never returns.
[in] | runnableThread | is a reference to RunnableThread object that is being run |