RTEMS
|
Simple Priority Scheduler. More...
Files | |
file | schedulersimple.h |
Manipulation of Threads Simple-Priority-Based Ready Queue. | |
file | schedulersimpleimpl.h |
Inlined Routines Associated with the Manipulation of the Priority-Based Scheduling Structures. | |
Classes | |
struct | Scheduler_simple_Context |
Simple scheduler context. More... | |
Macros | |
#define | SCHEDULER_SIMPLE_MAXIMUM_PRIORITY 255 |
#define | SCHEDULER_SIMPLE_ENTRY_POINTS |
Functions | |
void | _Scheduler_simple_Initialize (const Scheduler_Control *scheduler) |
Initializes simple scheduler. More... | |
void | _Scheduler_simple_Schedule (const Scheduler_Control *scheduler, Thread_Control *the_thread) |
Schedules threads. More... | |
void | _Scheduler_simple_Yield (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Performs the yield of a thread. More... | |
void | _Scheduler_simple_Block (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Blocks the thread. More... | |
void | _Scheduler_simple_Unblock (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Unblocks the thread. More... | |
void | _Scheduler_simple_Update_priority (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Updates the priority of the node. More... | |
static __inline__ Scheduler_simple_Context * | _Scheduler_simple_Get_context (const Scheduler_Control *scheduler) |
Gets context of the scheduler. More... | |
static __inline__ bool | _Scheduler_simple_Priority_less_equal (const void *to_insert, const Chain_Node *next) |
Checks if the priority is less or equal than the priority of the node. More... | |
static __inline__ void | _Scheduler_simple_Insert (Chain_Control *chain, Thread_Control *to_insert, unsigned int insert_priority) |
Inserts the thread control with the given priority into the chain. More... | |
static __inline__ void | _Scheduler_simple_Extract (const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node) |
Extracts the threads node. More... | |
static __inline__ void | _Scheduler_simple_Schedule_body (const Scheduler_Control *scheduler, Thread_Control *the_thread, bool force_dispatch) |
Scheduling decision logic. More... | |
Simple Priority Scheduler.
#define SCHEDULER_SIMPLE_ENTRY_POINTS |
Entry points for Scheduler Simple
Definition at line 45 of file schedulersimple.h.
void _Scheduler_simple_Block | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Blocks the thread.
scheduler | The scheduler instance. | |
[in,out] | the_thread | The thread to block. |
[in,out] | node | The thread's scheduler node. |
|
static |
Extracts the threads node.
scheduler | This parameter is unused. | |
[in,out] | the_thread | The thread of which to extract the node out of its chain. |
node | This parameter is unused. |
Definition at line 102 of file schedulersimpleimpl.h.
|
static |
Gets context of the scheduler.
scheduler | The scheduler instance to get the context of. |
Definition at line 46 of file schedulersimpleimpl.h.
void _Scheduler_simple_Initialize | ( | const Scheduler_Control * | scheduler | ) |
Initializes simple scheduler.
This routine initializes the simple scheduler.
scheduler | The scheduler to be initialized. |
|
static |
Inserts the thread control with the given priority into the chain.
[in,out] | chain | The chain to insert to_insert in. |
[in,out] | to_insert | The node to insert into chain. |
insert_priority | The priority to insert to_insert with. |
Definition at line 81 of file schedulersimpleimpl.h.
|
static |
Checks if the priority is less or equal than the priority of the node.
to_insert | The priority to check whether it is less or equal than next. |
next | The Chain node to compare the priority of. |
true | to_insert is smaller or equal than the priority of next. |
false | to_insert is greater than the priority of next. |
Definition at line 60 of file schedulersimpleimpl.h.
void _Scheduler_simple_Schedule | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread | ||
) |
Schedules threads.
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.
scheduler | The scheduler instance. |
the_thread | causing the scheduling operation. |
|
static |
Scheduling decision logic.
This kernel routine implements scheduling decision logic for the simple scheduler.
[in,out] | scheduler | The scheduler instance. |
the_thread | This parameter is unused. | |
force_dispatch | Indicates whether the dispatch happens also if the currently executing thread is set as not preemptible. |
Definition at line 124 of file schedulersimpleimpl.h.
void _Scheduler_simple_Unblock | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Unblocks the thread.
scheduler | The scheduler instance. | |
[in,out] | the_thread | The thread to unblock. |
[in,out] | node | The thread's scheduler node. |
void _Scheduler_simple_Update_priority | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Updates the priority of the node.
scheduler | The scheduler instance. |
the_thread | The thread for the operation. |
node | The thread's scheduler node. |
void _Scheduler_simple_Yield | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Performs the yield of a thread.
scheduler | The scheduler instance. | |
[in,out] | the_thread | The thread that performed the yield operation. |
node | The scheduler node of the_thread. |