RTEMS 6.1-rc6
|
This group contains the EDF Scheduler implementation. More...
Files | |
file | scheduleredf.h |
This header file provides interfaces of the EDF Scheduler which are used by the implementation and the Application Configuration. | |
file | scheduleredfimpl.h |
This header file provides interfaces of the EDF Scheduler which are only used by the implementation. | |
file | scheduleredf.c |
This source file contains the implementation of _Scheduler_EDF_Initialize(). | |
file | scheduleredfblock.c |
This source file contains the implementation of _Scheduler_EDF_Block(). | |
file | scheduleredfchangepriority.c |
This source file contains the implementation of _Scheduler_EDF_Update_priority(). | |
file | scheduleredfnodeinit.c |
This source file contains the implementation of _Scheduler_EDF_Node_initialize(). | |
file | scheduleredfreleasejob.c |
This source file contains the implementation of _Scheduler_EDF_Map_priority(), _Scheduler_EDF_Unmap_priority(), _Scheduler_EDF_Release_job(), and _Scheduler_EDF_Cancel_job(). | |
file | scheduleredfschedule.c |
This source file contains the implementation of _Scheduler_EDF_Schedule(). | |
file | scheduleredfunblock.c |
This source file contains the implementation of _Scheduler_EDF_Unblock(). | |
file | scheduleredfyield.c |
This source file contains the implementation of _Scheduler_EDF_Yield(). | |
Data Structures | |
struct | Scheduler_EDF_Context |
struct | Scheduler_EDF_Node |
Scheduler node specialization for EDF schedulers. More... | |
Macros | |
#define | SCHEDULER_EDF_MAXIMUM_PRIORITY INT_MAX |
#define | SCHEDULER_EDF_ENTRY_POINTS |
#define | SCHEDULER_EDF_PRIO_MSB 0x8000000000000000 |
Functions | |
void | _Scheduler_EDF_Initialize (const Scheduler_Control *scheduler) |
Initializes EDF scheduler. | |
void | _Scheduler_EDF_Block (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Removes the blocking thread from the ready queue and schedules is only again if the thread is executing or the heir thread. | |
void | _Scheduler_EDF_Schedule (const Scheduler_Control *scheduler, Thread_Control *the_thread) |
Sets the heir thread to be the next ready thread in the rbtree ready queue. | |
void | _Scheduler_EDF_Node_initialize (const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority) |
Initializes an EDF specific scheduler node of the_thread. | |
void | _Scheduler_EDF_Unblock (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Performs an unblocking of the thread. | |
void | _Scheduler_EDF_Update_priority (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Updates the priority of the scheduler node. | |
Priority_Control | _Scheduler_EDF_Map_priority (const Scheduler_Control *scheduler, Priority_Control priority) |
Gets the mapped priority map of the priority control. | |
Priority_Control | _Scheduler_EDF_Unmap_priority (const Scheduler_Control *scheduler, Priority_Control priority) |
Gets the unmapped priority map of the priority control. | |
void | _Scheduler_EDF_Yield (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Executes a thread yield for the thread. | |
void | _Scheduler_EDF_Release_job (const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, uint64_t deadline, Thread_queue_Context *queue_context) |
Releases a EDF job. | |
void | _Scheduler_EDF_Cancel_job (const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context) |
Cancels a job and removes the thread from the queue context. | |
This group contains the EDF Scheduler implementation.
#define SCHEDULER_EDF_ENTRY_POINTS |
Entry points for the Earliest Deadline First Scheduler.
#define SCHEDULER_EDF_PRIO_MSB 0x8000000000000000 |
This is just a most significant bit of Priority_Control type. It distinguishes threads which are deadline driven (priority represented by a lower number than SCHEDULER_EDF_PRIO_MSB) from those ones who do not have any deadlines and thus are considered background tasks.
void _Scheduler_EDF_Block | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Removes the blocking thread from the ready queue and schedules is only again if the thread is executing or the heir thread.
[in,out] | scheduler | The scheduler for the operation. |
the_thread | The thread to operate upon. | |
[in,out] | node | The scheduler node for this thread. |
void _Scheduler_EDF_Cancel_job | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Priority_Node * | priority_node, | ||
Thread_queue_Context * | queue_context | ||
) |
Cancels a job and removes the thread from the queue context.
scheduler | The scheduler instance. | |
the_thread | The thread for the operation. | |
[in,out] | priority_node | The corresponding priority node. |
[in,out] | queue_context | The thread queue context. |
void _Scheduler_EDF_Initialize | ( | const Scheduler_Control * | scheduler | ) |
Initializes EDF scheduler.
This routine initializes the EDF scheduler.
[in,out] | scheduler | The scheduler instance. |
Priority_Control _Scheduler_EDF_Map_priority | ( | const Scheduler_Control * | scheduler, |
Priority_Control | priority | ||
) |
Gets the mapped priority map of the priority control.
scheduler | Not used in this operation. |
priority | The priority control to get the priority map of. |
void _Scheduler_EDF_Node_initialize | ( | const Scheduler_Control * | scheduler, |
Scheduler_Node * | node, | ||
Thread_Control * | the_thread, | ||
Priority_Control | priority | ||
) |
Initializes an EDF specific scheduler node of the_thread.
scheduler | The scheduler instance. |
node | The node being initialized. |
the_thread | The thread of the node. |
priority | The thread priority. |
void _Scheduler_EDF_Release_job | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Priority_Node * | priority_node, | ||
uint64_t | deadline, | ||
Thread_queue_Context * | queue_context | ||
) |
Releases a EDF job.
scheduler | The scheduler instance | |
the_thread | The thread | |
[in,out] | priority_node | The priority node for the operation. |
deadline | The deadline for the job. | |
[in,out] | queue_context | The thread queue context. |
void _Scheduler_EDF_Schedule | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread | ||
) |
Sets the heir thread to be the next ready thread in the rbtree ready queue.
This kernel routine sets the heir thread to be the next ready thread in the rbtree ready queue.
[in,out] | scheduler | The scheduler instance. |
the_thread | The thread being scheduled. |
void _Scheduler_EDF_Unblock | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Performs an unblocking of the thread.
[in,out] | scheduler | The scheduler instance. |
the_thread | The unblocking thread. May be set as new heir. | |
[in,out] | node | The scheduler node for the thread. |
Priority_Control _Scheduler_EDF_Unmap_priority | ( | const Scheduler_Control * | scheduler, |
Priority_Control | priority | ||
) |
Gets the unmapped priority map of the priority control.
scheduler | Not used in this operation. |
priority | The priority control to get the priority map of. |
void _Scheduler_EDF_Update_priority | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Updates the priority of the scheduler node.
scheduler | The scheduler instance. | |
the_thread | The thread for the operation. | |
[in,out] | node | The priority node to update the priority of. |
void _Scheduler_EDF_Yield | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Executes a thread yield for the thread.
[in,out] | scheduler | The scheduler instance. |
the_thread | The thread that performs the yield. | |
[in,out] | node | The scheduler node for this thread. |