distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
ThreadList.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADLIST_HPP_
13 #define INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADLIST_HPP_
14 
16 
18 
19 namespace distortos
20 {
21 
22 namespace internal
23 {
24 
25 class ThreadControlBlock;
26 
29 {
35  {
36 
37  }
38 
48  bool operator()(const ThreadListNode& left, const ThreadListNode& right) const
49  {
50  return left.getEffectivePriority() < right.getEffectivePriority();
51  }
52 };
53 
55 class ThreadList : public estd::SortedIntrusiveList<ThreadDescendingEffectivePriority, ThreadListNode,
56  &ThreadListNode::threadListNode, ThreadControlBlock>
57 {
58 
59 };
60 
61 } // namespace internal
62 
63 } // namespace distortos
64 
65 #endif // INCLUDE_DISTORTOS_INTERNAL_SCHEDULER_THREADLIST_HPP_
constexpr ThreadDescendingEffectivePriority()
ThreadDescendingEffectivePriority&#39;s constructor.
Definition: ThreadList.hpp:34
bool operator()(const ThreadListNode &left, const ThreadListNode &right) const
ThreadDescendingEffectivePriority&#39;s function call operator.
Definition: ThreadList.hpp:48
functor which gives descending effective priority order of elements on the list
Definition: ThreadList.hpp:28
uint8_t getEffectivePriority() const
Definition: ThreadListNode.hpp:53
ThreadListNode class header.
SortedIntrusiveList class is an IntrusiveList with sorted elements.
Definition: SortedIntrusiveList.hpp:40
Top-level namespace of distortos project.
SortedIntrusiveList template class header.
sorted intrusive list of threads (thread control blocks)
Definition: ThreadList.hpp:55
ThreadListNode class is a base for ThreadControlBlock that provides nodes for intrusive lists...
Definition: ThreadListNode.hpp:30