RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions

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.
 

Detailed Description

This group contains the EDF Scheduler implementation.

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_DEFAULT_SMP_OPERATIONS \
_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_Start_idle /* start idle entry point */ \
}
void _Scheduler_EDF_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Performs an unblocking of the thread.
Definition: scheduleredfunblock.c:46
void _Scheduler_EDF_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Executes a thread yield for the thread.
Definition: scheduleredfyield.c:44
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.
Definition: scheduleredfreleasejob.c:98
void _Scheduler_EDF_Initialize(const Scheduler_Control *scheduler)
Initializes EDF scheduler.
Definition: scheduleredf.c:44
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.
Definition: scheduleredfreleasejob.c:61
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 executi...
Definition: scheduleredfblock.c:44
Priority_Control _Scheduler_EDF_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Gets the mapped priority map of the priority control.
Definition: scheduleredfreleasejob.c:45
Priority_Control _Scheduler_EDF_Unmap_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Gets the unmapped priority map of the priority control.
Definition: scheduleredfreleasejob.c:53
void _Scheduler_EDF_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the scheduler node.
Definition: scheduleredfchangepriority.c:44
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.
Definition: scheduleredfschedule.c:44
void _Scheduler_default_Node_destroy(const Scheduler_Control *scheduler, Scheduler_Node *node)
Does nothing.
Definition: schedulerdefaultnodedestroy.c:45
#define SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION
This define provides the default implementation for the SMP-specific set affinity operation.
Definition: scheduler.h:689
void _Scheduler_default_Start_idle(const Scheduler_Control *scheduler, Thread_Control *the_thread, struct Per_CPU_Control *cpu)
Starts an idle thread.
Definition: schedulerdefaultstartidle.c:43

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_Block()

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.

Parameters
[in,out]schedulerThe scheduler for the operation.
the_threadThe thread to operate upon.
[in,out]nodeThe scheduler node for this thread.

◆ _Scheduler_EDF_Cancel_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.

Parameters
schedulerThe scheduler instance.
the_threadThe thread for the operation.
[in,out]priority_nodeThe corresponding priority node.
[in,out]queue_contextThe thread queue context.

◆ _Scheduler_EDF_Initialize()

void _Scheduler_EDF_Initialize ( const Scheduler_Control scheduler)

Initializes EDF scheduler.

This routine initializes the EDF scheduler.

Parameters
[in,out]schedulerThe scheduler instance.

◆ _Scheduler_EDF_Map_priority()

Priority_Control _Scheduler_EDF_Map_priority ( const Scheduler_Control scheduler,
Priority_Control  priority 
)

Gets the mapped priority map of the priority control.

Parameters
schedulerNot used in this operation.
priorityThe priority control to get the priority map of.
Returns
The mapped priority map of priority.

◆ _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
schedulerThe scheduler instance.
nodeThe node being initialized.
the_threadThe thread of the node.
priorityThe thread priority.

◆ _Scheduler_EDF_Release_job()

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.

Parameters
schedulerThe scheduler instance
the_threadThe thread
[in,out]priority_nodeThe priority node for the operation.
deadlineThe deadline for the job.
[in,out]queue_contextThe thread queue context.

◆ _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,out]schedulerThe scheduler instance.
the_threadThe thread being scheduled.

◆ _Scheduler_EDF_Unblock()

void _Scheduler_EDF_Unblock ( const Scheduler_Control scheduler,
Thread_Control the_thread,
Scheduler_Node node 
)

Performs an unblocking of the thread.

Parameters
[in,out]schedulerThe scheduler instance.
the_threadThe unblocking thread. May be set as new heir.
[in,out]nodeThe scheduler node for the thread.

◆ _Scheduler_EDF_Unmap_priority()

Priority_Control _Scheduler_EDF_Unmap_priority ( const Scheduler_Control scheduler,
Priority_Control  priority 
)

Gets the unmapped priority map of the priority control.

Parameters
schedulerNot used in this operation.
priorityThe priority control to get the priority map of.
Returns
The unmapped priority map of priority.

◆ _Scheduler_EDF_Update_priority()

void _Scheduler_EDF_Update_priority ( const Scheduler_Control scheduler,
Thread_Control the_thread,
Scheduler_Node node 
)

Updates the priority of the scheduler node.

Parameters
schedulerThe scheduler instance.
the_threadThe thread for the operation.
[in,out]nodeThe priority node to update the priority of.

◆ _Scheduler_EDF_Yield()

void _Scheduler_EDF_Yield ( const Scheduler_Control scheduler,
Thread_Control the_thread,
Scheduler_Node node 
)

Executes a thread yield for the thread.

Parameters
[in,out]schedulerThe scheduler instance.
the_threadThe thread that performs the yield.
[in,out]nodeThe scheduler node for this thread.