RTEMS CPU Kit with SuperCore  4.11.3
Data Structures | Macros | Functions
Simple Priority Scheduler
Collaboration diagram for Simple Priority Scheduler:

Data Structures

struct  Scheduler_simple_Context
 Simple scheduler context. More...
 

Macros

#define SCHEDULER_SIMPLE_ENTRY_POINTS
 Entry points for Scheduler Simple. More...
 

Functions

void _Scheduler_simple_Initialize (const Scheduler_Control *scheduler)
 Initialize simple scheduler. More...
 
void _Scheduler_simple_Schedule (const Scheduler_Control *scheduler, Thread_Control *the_thread)
 This routine sets the heir thread to be the next ready thread on the ready queue by getting the first node in the scheduler information. More...
 
Scheduler_Void_or_thread _Scheduler_simple_Yield (const Scheduler_Control *scheduler, Thread_Control *the_thread)
 Invoked when a thread wishes to voluntarily transfer control of the processor to another thread in the queue. More...
 
void _Scheduler_simple_Block (const Scheduler_Control *scheduler, Thread_Control *the_thread)
 Remove a simple-priority-based thread from the queue. More...
 
Scheduler_Void_or_thread _Scheduler_simple_Unblock (const Scheduler_Control *scheduler, Thread_Control *the_thread)
 Unblock a simple-priority-based thread. More...
 
Scheduler_Void_or_thread _Scheduler_simple_Change_priority (const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it)
 
RTEMS_INLINE_ROUTINE Scheduler_simple_Context_Scheduler_simple_Get_context (const Scheduler_Control *scheduler)
 
RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Insert_priority_lifo_order (const Chain_Node *to_insert, const Chain_Node *next)
 
RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Insert_priority_fifo_order (const Chain_Node *to_insert, const Chain_Node *next)
 
RTEMS_INLINE_ROUTINE void _Scheduler_simple_Insert_priority_lifo (Chain_Control *chain, Thread_Control *to_insert)
 
RTEMS_INLINE_ROUTINE void _Scheduler_simple_Insert_priority_fifo (Chain_Control *chain, Thread_Control *to_insert)
 
RTEMS_INLINE_ROUTINE void _Scheduler_simple_Extract (const Scheduler_Control *scheduler, Thread_Control *the_thread)
 
RTEMS_INLINE_ROUTINE void _Scheduler_simple_Schedule_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, bool force_dispatch)
 

Detailed Description

Macro Definition Documentation

◆ SCHEDULER_SIMPLE_ENTRY_POINTS

#define SCHEDULER_SIMPLE_ENTRY_POINTS
Value:
{ \
_Scheduler_simple_Initialize, /* initialize entry point */ \
_Scheduler_simple_Schedule, /* schedule entry point */ \
_Scheduler_simple_Yield, /* yield entry point */ \
_Scheduler_simple_Block, /* block entry point */ \
_Scheduler_simple_Unblock, /* unblock entry point */ \
_Scheduler_simple_Change_priority, /* change priority entry point */ \
_Scheduler_default_Node_initialize, /* node initialize entry point */ \
_Scheduler_default_Node_destroy, /* node destroy entry point */ \
_Scheduler_default_Update_priority, /* update priority entry point */ \
_Scheduler_priority_Priority_compare, /* compares two priorities */ \
_Scheduler_default_Release_job, /* new 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_default_Node_initialize(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Does nothing.
Definition: schedulerdefaultnodeinit.c:24

Entry points for Scheduler Simple.

Function Documentation

◆ _Scheduler_simple_Block()

void _Scheduler_simple_Block ( const Scheduler_Control scheduler,
Thread_Control the_thread 
)

Remove a simple-priority-based thread from the queue.

This routine removes the_thread from the scheduling decision, that is, removes it from the ready queue. It performs any necessary scheduling operations including the selection of a new heir thread.

Parameters
[in]schedulerThe scheduler instance.
[in]the_threadis the thread that is to be blocked

◆ _Scheduler_simple_Initialize()

void _Scheduler_simple_Initialize ( const Scheduler_Control scheduler)

Initialize simple scheduler.

This routine initializes the simple scheduler.

◆ _Scheduler_simple_Schedule()

void _Scheduler_simple_Schedule ( const Scheduler_Control scheduler,
Thread_Control the_thread 
)

This routine sets the heir thread to be the next ready thread on the ready queue by getting the first node in the scheduler information.

Parameters
[in]schedulerThe scheduler instance.
[in]the_threadcausing the scheduling operation.

◆ _Scheduler_simple_Unblock()

Scheduler_Void_or_thread _Scheduler_simple_Unblock ( const Scheduler_Control scheduler,
Thread_Control the_thread 
)

Unblock a simple-priority-based thread.

This routine adds the_thread to the scheduling decision, that is, adds it to the ready queue and updates any appropriate scheduling variables, for example the heir thread.

Parameters
[in]schedulerThe scheduler instance.
[in]the_threadis the thread that is to be unblocked

◆ _Scheduler_simple_Yield()

Scheduler_Void_or_thread _Scheduler_simple_Yield ( const Scheduler_Control scheduler,
Thread_Control the_thread 
)

Invoked when a thread wishes to voluntarily transfer control of the processor to another thread in the queue.

This routine is invoked when a thread wishes to voluntarily transfer control of the processor to another thread in the queue. It will remove the specified THREAD from the scheduler.informaiton (where the ready queue is stored) and place it immediately at the between the last entry of its priority and the next priority thread. Reset timeslice and yield the processor functions both use this routine, therefore if reset is true and this is the only thread on the queue then the timeslice counter is reset. The heir THREAD will be updated if the running is also the currently the heir.

Parameters
[in]schedulerThe scheduler instance.
[in,out]the_threadThe yielding thread.