RTEMS  5.0.0
Files | Data Structures | Macros | Functions

Files

file  scheduleredfimpl.h
 EDF Scheduler Implementation.
 

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)
 Initialize EDF scheduler. More...
 
void _Scheduler_EDF_Block (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
 
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. More...
 
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. More...
 
void _Scheduler_EDF_Unblock (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
 
void _Scheduler_EDF_Update_priority (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
 
Priority_Control _Scheduler_EDF_Map_priority (const Scheduler_Control *scheduler, Priority_Control priority)
 
Priority_Control _Scheduler_EDF_Unmap_priority (const Scheduler_Control *scheduler, Priority_Control priority)
 
void _Scheduler_EDF_Yield (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
 
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)
 
void _Scheduler_EDF_Cancel_job (const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Scheduler_EDF_Context_Scheduler_EDF_Get_context (const Scheduler_Control *scheduler)
 
RTEMS_INLINE_ROUTINE Scheduler_EDF_Node_Scheduler_EDF_Thread_get_node (Thread_Control *the_thread)
 
RTEMS_INLINE_ROUTINE Scheduler_EDF_Node_Scheduler_EDF_Node_downcast (Scheduler_Node *node)
 
RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Less (const void *left, const RBTree_Node *right)
 
RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Priority_less_equal (const void *left, const RBTree_Node *right)
 
RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Enqueue (Scheduler_EDF_Context *context, Scheduler_EDF_Node *node, Priority_Control insert_priority)
 
RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract (Scheduler_EDF_Context *context, Scheduler_EDF_Node *node)
 
RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
 
RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Schedule_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, bool force_dispatch)
 

Detailed Description

Macro Definition Documentation

◆ SCHEDULER_EDF_ENTRY_POINTS

#define SCHEDULER_EDF_ENTRY_POINTS
Value:
{ \
_Scheduler_EDF_Initialize, /* initialize entry point */ \
_Scheduler_EDF_Schedule, /* schedule entry point */ \
_Scheduler_EDF_Yield, /* yield entry point */ \
_Scheduler_EDF_Block, /* block entry point */ \
_Scheduler_EDF_Unblock, /* unblock entry point */ \
_Scheduler_EDF_Update_priority, /* update priority entry point */ \
_Scheduler_EDF_Map_priority, /* map priority entry point */ \
_Scheduler_EDF_Unmap_priority, /* unmap priority entry point */ \
_Scheduler_EDF_Node_initialize, /* node initialize entry point */ \
_Scheduler_default_Node_destroy, /* node destroy entry point */ \
_Scheduler_EDF_Release_job, /* new period of task */ \
_Scheduler_EDF_Cancel_job, /* cancel period of task */ \
_Scheduler_default_Tick, /* tick entry point */ \
_Scheduler_default_Start_idle /* start idle entry point */ \
SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
}
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.
Definition: scheduleredfnodeinit.c:23

Entry points for the Earliest Deadline First Scheduler.

◆ SCHEDULER_EDF_PRIO_MSB

#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.

Function Documentation

◆ _Scheduler_EDF_Initialize()

void _Scheduler_EDF_Initialize ( const Scheduler_Control scheduler)

Initialize EDF scheduler.

This routine initializes the EDF scheduler.

Parameters
[in]schedulerThe scheduler instance.

◆ _Scheduler_EDF_Node_initialize()

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.

Parameters
[in]schedulerThe scheduler instance.
[in]nodebeing initialized.
[in]the_threadthe thread of the node.
[in]priorityThe thread priority.

◆ _Scheduler_EDF_Schedule()

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.

Parameters
[in]schedulerThe scheduler instance.
[in]the_threadbeing scheduled.