12 #ifndef INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADCOMMON_HPP_ 13 #define INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADCOMMON_HPP_ 55 #if DISTORTOS_SIGNALS_ENABLE == 1 76 #endif // DISTORTOS_SIGNALS_ENABLE == 1 91 #if DISTORTOS_SIGNALS_ENABLE == 1 107 #endif // DISTORTOS_SIGNALS_ENABLE == 1 159 #if DISTORTOS_SIGNALS_ENABLE == 1 181 #endif // DISTORTOS_SIGNALS_ENABLE == 1 194 void setPriority(uint8_t priority,
bool alwaysBehind = {})
override;
271 #endif // INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADCOMMON_HPP_ ~ThreadCommon() override
ThreadCommon's destructor.
Definition: ThreadCommon.cpp:45
int generateSignal(uint8_t signalNumber) override
Generates signal for thread.
Definition: ThreadCommon.cpp:52
uint8_t getEffectivePriority() const override
Definition: ThreadCommon.cpp:64
Semaphore is the basic synchronization primitive.
Definition: Semaphore.hpp:30
SchedulingPolicy getSchedulingPolicy() const override
Definition: ThreadCommon.cpp:94
ThreadControlBlock class is a simple description of a Thread.
Definition: ThreadControlBlock.hpp:39
ThreadControlBlock & getThreadControlBlock()
Definition: ThreadCommon.hpp:233
size_t getStackSize() const override
Definition: ThreadCommon.cpp:104
SignalSet getPendingSignalSet() const override
Gets set of currently pending signals.
Definition: ThreadCommon.cpp:77
Semaphore joinSemaphore_
semaphore used by join()
Definition: ThreadCommon.hpp:264
ThreadControlBlock class header.
ThreadGroupControlBlock class is a control block for ThreadGroup.
Definition: ThreadGroupControlBlock.hpp:26
RunnableThread class defines additional interface functions required for the thread to be actually ru...
Definition: RunnableThread.hpp:24
void setPriority(uint8_t priority, bool alwaysBehind={}) override
Changes priority of thread.
Definition: ThreadCommon.cpp:140
SignalsReceiver class is a container for internal::SignalsReceiverControlBlock.
Definition: SignalsReceiver.hpp:32
SchedulingPolicy
scheduling policy of the thread
Definition: SchedulingPolicy.hpp:26
ThreadState getState() const override
Definition: ThreadCommon.cpp:109
std::unique_ptr< void, void(&)(void *)> StorageUniquePointer
unique_ptr (with deleter) to storage
Definition: Stack.hpp:37
int join() override
Waits for thread termination.
Definition: ThreadCommon.cpp:114
ThreadCommon(Stack &&stack, uint8_t priority, SchedulingPolicy schedulingPolicy, ThreadGroupControlBlock *threadGroupControlBlock, SignalsReceiver *signalsReceiver)
ThreadCommon's constructor.
Definition: ThreadCommon.cpp:36
Stack::StorageUniquePointer StackStorageUniquePointer
unique_ptr (with deleter) to storage for stack
Definition: ThreadCommon.hpp:32
ThreadIdentifier getIdentifier() const override
Definition: ThreadCommon.cpp:69
void exit0Hook() override
Thread's "exit 0" hook function.
Definition: ThreadCommon.cpp:154
SignalSet class is used as a set of signals.
Definition: SignalSet.hpp:28
Top-level namespace of distortos project.
Definition: buttons.hpp:33
ThreadControlBlock threadControlBlock_
internal ThreadControlBlock object
Definition: ThreadCommon.hpp:261
Stack class is an abstraction of architecture's stack.
Definition: Stack.hpp:32
size_t getStackHighWaterMark() const override
Definition: ThreadCommon.cpp:99
int startInternal()
Starts the thread.
Definition: ThreadCommon.cpp:164
RunnableThread class header.
const ThreadControlBlock & getThreadControlBlock() const
Definition: ThreadCommon.hpp:242
ThreadIdentifier class is an identifier of thread.
Definition: ThreadIdentifier.hpp:52
void exit1Hook() override
Thread's "exit 1" hook function.
Definition: ThreadCommon.cpp:159
ThreadCommon class implements common functionality of threads.
Definition: ThreadCommon.hpp:27
ThreadState
state of the thread
Definition: ThreadState.hpp:28
int queueSignal(uint8_t signalNumber, sigval value) override
Queues signal for thread.
Definition: ThreadCommon.cpp:128
void setSchedulingPolicy(SchedulingPolicy schedulingPolicy) override
Definition: ThreadCommon.cpp:145
uint8_t getPriority() const override
Definition: ThreadCommon.cpp:89