12 #ifndef INCLUDE_DISTORTOS_THREAD_HPP_ 13 #define INCLUDE_DISTORTOS_THREAD_HPP_ 26 class ThreadIdentifier;
44 #ifdef DISTORTOS_THREAD_DETACH_ENABLE 62 #endif // def DISTORTOS_THREAD_DETACH_ENABLE 64 #if DISTORTOS_SIGNALS_ENABLE == 1 85 #endif // DISTORTOS_SIGNALS_ENABLE == 1 100 #if DISTORTOS_SIGNALS_ENABLE == 1 116 #endif // DISTORTOS_SIGNALS_ENABLE == 1 167 virtual int join() = 0;
169 #if DISTORTOS_SIGNALS_ENABLE == 1 193 #endif // DISTORTOS_SIGNALS_ENABLE == 1 206 virtual void setPriority(uint8_t priority,
bool alwaysBehind = {}) = 0;
217 #endif // INCLUDE_DISTORTOS_THREAD_HPP_ virtual int detach()=0
Detaches the thread.
virtual ThreadState getState() const =0
virtual void setSchedulingPolicy(SchedulingPolicy schedulingPolicy)=0
virtual size_t getStackSize() const =0
SchedulingPolicy
scheduling policy of the thread
Definition: SchedulingPolicy.hpp:26
ThreadState enum class header.
virtual size_t getStackHighWaterMark() const =0
virtual SchedulingPolicy getSchedulingPolicy() const =0
virtual uint8_t getEffectivePriority() const =0
virtual uint8_t getPriority() const =0
virtual ~Thread()=default
Thread's destructor.
SignalSet class is used as a set of signals.
Definition: SignalSet.hpp:28
Top-level namespace of distortos project.
Definition: buttons.hpp:33
virtual void setPriority(uint8_t priority, bool alwaysBehind={})=0
Changes priority of thread.
virtual ThreadIdentifier getIdentifier() const =0
virtual SignalSet getPendingSignalSet() const =0
Gets set of currently pending signals.
virtual int queueSignal(uint8_t signalNumber, sigval value)=0
Queues signal for thread.
virtual int generateSignal(uint8_t signalNumber)=0
Generates signal for thread.
virtual int join()=0
Waits for thread termination.
ThreadIdentifier class is an identifier of thread.
Definition: ThreadIdentifier.hpp:52
Thread class is a pure abstract interface for threads.
Definition: Thread.hpp:34
ThreadState
state of the thread
Definition: ThreadState.hpp:28
SchedulingPolicy enum class header.