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

UndetachableThread class is a ThreadCommon that cannot be detached. More...

#include <UndetachableThread.hpp>

Inheritance diagram for distortos::UndetachableThread:
[legend]
Collaboration diagram for distortos::UndetachableThread:
[legend]

Public Member Functions

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

UndetachableThread class is a ThreadCommon that cannot be detached.

Member Function Documentation

◆ detach()

int distortos::UndetachableThread::detach ( )
overridevirtual

Detaches the thread.

Similar to std::thread::detach() - http://en.cppreference.com/w/cpp/thread/thread/detach Similar to POSIX pthread_detach() - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_detach.html

Detaches the executing thread from the Thread object, allowing execution to continue independently. All resources allocated for the thread will be deallocated when the thread terminates.

Returns
ENOTSUP - this thread cannot be detached;

Implements distortos::Thread.


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