12 #ifndef INCLUDE_DISTORTOS_INTERNAL_MEMORY_DEFERREDTHREADDELETER_HPP_ 13 #define INCLUDE_DISTORTOS_INTERNAL_MEMORY_DEFERREDTHREADDELETER_HPP_ 17 #ifdef DISTORTOS_THREAD_DETACH_ENABLE 38 mutex_{Mutex::Protocol::priorityInheritance},
59 int operator()(ThreadControlBlock& threadControlBlock);
119 #endif // def DISTORTOS_THREAD_DETACH_ENABLE 121 #endif // INCLUDE_DISTORTOS_INTERNAL_MEMORY_DEFERREDTHREADDELETER_HPP_ int tryCleanupInternal()
Internals of tryCleanup().
Definition: DeferredThreadDeleter.cpp:72
constexpr DeferredThreadDeleter()
DeferredThreadDeleter's constructor.
Definition: DeferredThreadDeleter.hpp:36
ThreadList::UnsortedIntrusiveList list_
list of threads scheduled for deferred deletion
Definition: DeferredThreadDeleter.hpp:106
int lock()
Locks the object, preparing it for adding thread to internal list.
Definition: DeferredThreadDeleter.cpp:39
IntrusiveList< ThreadListNode, NodePointer, ThreadControlBlock > UnsortedIntrusiveList
unsorted intrusive list used internally
Definition: SortedIntrusiveList.hpp:45
int operator()(ThreadControlBlock &threadControlBlock)
DeferredThreadDeleter's function call operator.
Definition: DeferredThreadDeleter.cpp:31
DeferredThreadDeleter class can be used to defer deletion of dynamic detached threads.
Definition: DeferredThreadDeleter.hpp:28
Top-level namespace of distortos project.
Definition: buttons.hpp:33
Mutex is the basic synchronization primitive.
Definition: Mutex.hpp:30
volatile bool notEmpty_
true if list_ is not empty, false otherwise
Definition: DeferredThreadDeleter.hpp:112
int tryCleanup()
Tries to perform deferred deletion of threads.
Definition: DeferredThreadDeleter.cpp:44
Mutex mutex_
mutex that synchronizes access to the list_
Definition: DeferredThreadDeleter.hpp:109