10#ifndef STK_STRATEGY_EDF_H_
11#define STK_STRATEGY_EDF_H_
158 while (itr != start);
Contains interface definitions of the library.
#define STK_ASSERT(e)
Runtime assertion. Halts execution if the expression e evaluates to false.
#define STK_VIRT_DTOR
Makes destructors virtual and compliant to strict rules if STK_STRICT_COMPLIANCY=0.
Namespace of STK package.
Scheduling-strategy-facing interface for a kernel task slot.
virtual Timeout GetHrtRelativeDeadline() const =0
Get HRT task's relative deadline.
DLHeadType ListHeadType
List head type for IKernelTask elements.
virtual bool IsSleeping() const =0
Check whether the task is currently sleeping.
Interface for a task switching strategy implementation.
DLEntryType * GetNext()
Get the next entry in the list.
DLHeadType * GetHead()
Get the list head this entry currently belongs to.
SwitchStrategyEDF()
Construct an empty strategy with no tasks.
IKernelTask * GetFirst() override
Get first task in the managed set (used by the kernel for initial scheduling).
STK_VIRT_DTOR ~SwitchStrategyEDF()=default
Destructor.
IKernelTask::ListHeadType m_sleep
Sleeping (blocked) tasks not eligible for scheduling. Deadline tracking continues in the kernel while...
STK_NONCOPYABLE_CLASS(SwitchStrategyEDF)
EConfig
Compile-time capability flags reported to the kernel.
@ PRIORITY_INHERITANCE_API
This strategy does not require Priority Inheritance and OnTaskPriorityChange() events.
@ DEADLINE_MISSED_API
This strategy does not use OnTaskDeadlineMissed() events.
@ SLEEP_EVENT_API
This strategy requires OnTaskSleep() / OnTaskWake() events to move tasks between the runnable and sle...
@ WEIGHT_API
This strategy does not use per-task weights. Deadline tracking is handled by the kernel in KERNEL_HRT...
size_t GetSize() const override
Get total number of tasks managed by this strategy.
IKernelTask::ListHeadType m_tasks
Runnable tasks eligible for scheduling. Scanned in full by GetNext() each tick to find the minimum re...
void AddTask(IKernelTask *task) override
Add task to the runnable set.
void OnTaskWake(IKernelTask *task) override
Notification that a task has become runnable again.
void OnTaskSleep(IKernelTask *task) override
Notification that a task has entered the sleeping state.
void RemoveTask(IKernelTask *task) override
Remove task from whichever list it currently occupies.
IKernelTask * GetNext() override
Select and return the task with the earliest (minimum) relative deadline.