RTEMS
5.1
|
Deterministic Priority Scheduler. More...
Files | |
file | schedulerpriority.h |
Thread Manipulation with the Priority-Based Scheduler. | |
file | schedulerpriorityimpl.h |
Inlined Routines Associated with the Manipulation of the Priority-Based Scheduling Structures. | |
Data Structures | |
struct | Scheduler_priority_Context |
struct | Scheduler_priority_Ready_queue |
Data for ready queue operations. More... | |
struct | Scheduler_priority_Node |
Scheduler node specialization for Deterministic Priority schedulers. More... | |
Macros | |
#define | SCHEDULER_PRIORITY_ENTRY_POINTS |
Deterministic Priority Scheduler.
#define SCHEDULER_PRIORITY_ENTRY_POINTS |
Entry points for the Deterministic Priority Based Scheduler.
void _Scheduler_priority_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. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Extract_body | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | node | ||
) |
Extracts a node from the context of the scheduler.
scheduler | The scheduler instance. | |
the_thread | The thread of which the node will be extracted. | |
[in,out] | The | node which preserves the ready queue. |
RTEMS_INLINE_ROUTINE Scheduler_priority_Context* _Scheduler_priority_Get_context | ( | const Scheduler_Control * | scheduler | ) |
Gets the context of the scheduler.
scheduler | The scheduler to get the context of. |
void _Scheduler_priority_Initialize | ( | const Scheduler_Control * | scheduler | ) |
Initializes the priority scheduler.
This routine initializes the priority scheduler.
scheduler | The scheduler to initialize. |
RTEMS_INLINE_ROUTINE Scheduler_priority_Node* _Scheduler_priority_Node_downcast | ( | Scheduler_Node * | node | ) |
Gets the priority node of the scheduler node.
node | The node to get the priority node of. |
void _Scheduler_priority_Node_initialize | ( | const Scheduler_Control * | scheduler, |
Scheduler_Node * | node, | ||
Thread_Control * | the_thread, | ||
Priority_Control | priority | ||
) |
Initializes the node with the given priority.
scheduler | The scheduler instance. | |
[out] | node | The node to initialize. |
the_thread | The thread of the scheduler node. | |
priority | The priority for the initialization. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue | ( | Chain_Node * | node, |
Scheduler_priority_Ready_queue * | ready_queue, | ||
Priority_bit_map_Control * | bit_map | ||
) |
Enqueues a node on the specified ready queue.
The node is placed as the last element of its priority group.
node | The node to enqueue. | |
[in,out] | ready_queue | The ready queue. |
[out] | bit_map | The priority bit map of the scheduler instance. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first | ( | Chain_Node * | node, |
Scheduler_priority_Ready_queue * | ready_queue, | ||
Priority_bit_map_Control * | bit_map | ||
) |
Enqueues a node on the specified ready queue as first.
The node is placed as the first element of its priority group.
node | The node to enqueue as first. | |
[in,out] | ready_queue | The ready queue. |
[out] | bit_map | The priority bit map of the scheduler instance. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract | ( | Chain_Node * | node, |
Scheduler_priority_Ready_queue * | ready_queue, | ||
Priority_bit_map_Control * | bit_map | ||
) |
Extracts a node from the specified ready queue.
node | The node to extract. | |
[in,out] | ready_queue | The ready queue. |
[out] | bit_map | The priority bit map of the scheduler instance. |
RTEMS_INLINE_ROUTINE Chain_Node* _Scheduler_priority_Ready_queue_first | ( | Priority_bit_map_Control * | bit_map, |
Chain_Control * | ready_queues | ||
) |
Returns a pointer to the first node.
This routines returns a pointer to the first node on ready_queues.
bit_map | The priority bit map of the scheduler instance. |
ready_queues | The ready queues of the scheduler instance. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize | ( | Chain_Control * | ready_queues, |
Priority_Control | maximum_priority | ||
) |
Ready queue initialization.
This routine initializes ready_queues for priority-based scheduling.
[out] | ready_queues | The ready queue to initialize. |
maximum_priority | The maximum priority in the ready queue. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_update | ( | Scheduler_priority_Ready_queue * | ready_queue, |
unsigned int | new_priority, | ||
Priority_bit_map_Control * | bit_map, | ||
Chain_Control * | ready_queues | ||
) |
Updates the specified ready queue data according to the new priority value.
[in,out] | ready_queue | The ready queue. |
new_priority | The new priority. | |
bit_map | The priority bit map of the scheduler instance. | |
ready_queues | The ready queues of the scheduler instance. |
void _Scheduler_priority_Schedule | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread | ||
) |
Sets the heir thread to be the next ready thread.
This kernel routine sets the heir thread to be the next ready thread by invoking the_scheduler->ready_queue->operations->first().
scheduler | The scheduler instance. |
the_thread | The thread for the operation. |
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
bool | force_dispatch | ||
) |
Scheduling decision logic.
This kernel routine implements scheduling decision logic for priority-based scheduling.
[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. |
RTEMS_INLINE_ROUTINE Scheduler_priority_Node* _Scheduler_priority_Thread_get_node | ( | Thread_Control * | the_thread | ) |
Gets the scheduler node of the thread.
the_thread | The thread to get the scheduler node of. |
void _Scheduler_priority_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_priority_Update_priority | ( | const Scheduler_Control * | scheduler, |
Thread_Control * | the_thread, | ||
Scheduler_Node * | base_node | ||
) |
Updates the priority of the node.
scheduler | The scheduler instance. |
the_thread | The thread for the operation. |
base_node | The thread's scheduler node. |
void _Scheduler_priority_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. |