22 #ifndef _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H 23 #define _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H 97 for ( index = 0 ; index <= (size_t) maximum_priority ; ++index ) {
258 unsigned int new_priority,
264 ready_queue->
ready_chain = &ready_queues[ new_priority ];
static __inline__ Scheduler_priority_Node * _Scheduler_priority_Thread_get_node(Thread_Control *the_thread)
Gets the scheduler node of the thread.
static __inline__ Chain_Node * _Chain_First(const Chain_Control *the_chain)
Returns pointer to chain's first node.
Chain_Control Ready[0]
One ready queue per priority level.
uint64_t Priority_Control
The thread priority control.
Chain_Control * ready_chain
static __inline__ 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.
static __inline__ void _Chain_Initialize_node(Chain_Node *the_node)
Initializes a chain node.
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
Adds Priority queue bit map information.
Priority_bit_map_Information Priority_map
Inlined Routines Associated with the Manipulation of the Scheduler.
static __inline__ 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.
unsigned int current_priority
The thread priority currently used by the scheduler.
static __inline__ Scheduler_priority_Context * _Scheduler_priority_Get_context(const Scheduler_Control *scheduler)
Gets the context of the scheduler.
Thread Manipulation with the Priority-Based Scheduler.
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
Removes Priority queue bit map information.
static __inline__ void _Scheduler_priority_Ready_queue_initialize(Chain_Control *ready_queues, Priority_Control maximum_priority)
Ready queue initialization.
static __inline__ 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.
static __inline__ void _Scheduler_Update_heir(Thread_Control *new_heir, bool force_dispatch)
Updates the heir.
Inlined Routines in the Priority Handler Bit Map Implementation.
static __inline__ void _Chain_Append_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Appends a node (unprotected).
static __inline__ Chain_Node * _Scheduler_priority_Ready_queue_first(Priority_bit_map_Control *bit_map, Chain_Control *ready_queues)
Returns a pointer to the first node.
static __inline__ void _Chain_Prepend_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Prepends a node (unprotected).
Priority_bit_map_Control Bit_map
Bit map to indicate non-empty ready queues.
Data for ready queue operations.
static __inline__ Scheduler_Node * _Thread_Scheduler_get_home_node(const Thread_Control *the_thread)
Gets the scheduler's home node.
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
static __inline__ Scheduler_priority_Node * _Scheduler_priority_Node_downcast(Scheduler_Node *node)
Gets the priority node of the scheduler node.
static __inline__ 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.
static __inline__ bool _Chain_Has_only_one_node(const Chain_Control *the_chain)
Checks if this chain has only one node.
static __inline__ void _Chain_Extract_unprotected(Chain_Node *the_node)
Extracts this node (unprotected).
RTEMS_INLINE_ROUTINE unsigned int _Priority_bit_map_Get_highest(const Priority_bit_map_Control *bit_map)
Gets highest portion of Priority queue bit map.
Scheduler node specialization for Deterministic Priority schedulers.
static __inline__ void _Chain_Initialize_empty(Chain_Control *the_chain)
Initializes this chain as empty.
static __inline__ void _Scheduler_priority_Schedule_body(const Scheduler_Control *scheduler, Thread_Control *the_thread, bool force_dispatch)
Scheduling decision logic.
Scheduler node for per-thread data.
static __inline__ Scheduler_Context * _Scheduler_Get_context(const Scheduler_Control *scheduler)
Gets the context of the scheduler.
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info, unsigned int new_priority)
Initializes the bit map information.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Constants and Structures Related with the Thread Control Block.
static __inline__ Chain_Node * _Chain_Tail(Chain_Control *the_chain)
Returns pointer to chain tail.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
static __inline__ 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.