38#ifndef _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H
39#define _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H
106static inline void _Scheduler_priority_Ready_queue_initialize(
113 for ( index = 0 ; index <= (size_t) maximum_priority ; ++index ) {
114 _Chain_Initialize_empty( &ready_queues[ index ] );
127static inline void _Scheduler_priority_Ready_queue_enqueue(
135 _Chain_Append_unprotected( ready_chain, node );
136 _Priority_bit_map_Add( bit_map, &ready_queue->
Priority_map );
148static inline void _Scheduler_priority_Ready_queue_enqueue_first(
156 _Chain_Prepend_unprotected( ready_chain, node );
157 _Priority_bit_map_Add( bit_map, &ready_queue->
Priority_map );
167static inline void _Scheduler_priority_Ready_queue_extract(
175 if ( _Chain_Has_only_one_node( ready_chain ) ) {
176 _Chain_Initialize_empty( ready_chain );
177 _Chain_Initialize_node( node );
178 _Priority_bit_map_Remove( bit_map, &ready_queue->
Priority_map );
180 _Chain_Extract_unprotected( node );
191static inline void _Scheduler_priority_Extract_body(
200 context = _Scheduler_priority_Get_context( scheduler );
201 the_node = _Scheduler_priority_Node_downcast( node );
203 _Scheduler_priority_Ready_queue_extract(
205 &the_node->Ready_queue,
220static inline Chain_Node *_Scheduler_priority_Ready_queue_first(
226 Chain_Node *first = _Chain_First( &ready_queues[ index ] );
228 _Assert( first != _Chain_Tail( &ready_queues[ index ] ) );
238static inline Thread_Control *_Scheduler_priority_Get_highest_ready(
243 _Scheduler_priority_Get_context( scheduler );
260static inline void _Scheduler_priority_Ready_queue_update(
262 unsigned int new_priority,
268 ready_queue->
ready_chain = &ready_queues[ new_priority ];
270 _Priority_bit_map_Initialize_information(
This header file provides interfaces of the Chain Handler which are only used by the implementation.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:91
This header file provides interfaces of the Priority Bitmap which are only used by the implementation...
rtems_termios_device_context * context
Definition: console-config.c:62
This header file provides interfaces of the Deterministic Priority Scheduler which are used by the im...
This header file provides interfaces of the supporting the implementation of uniprocessor schedulers.
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
This structure represents a chain node.
Definition: chain.h:78
Chain_Node Node
Definition: objectdata.h:63
Definition: prioritybitmap.h:60
Scheduler node for per-thread data.
Definition: schedulernode.h:94
Definition: schedulerpriority.h:83
Scheduler node specialization for Deterministic Priority schedulers.
Definition: schedulerpriority.h:119
Data for ready queue operations.
Definition: schedulerpriority.h:103
unsigned int current_priority
The thread priority currently used by the scheduler.
Definition: schedulerpriority.h:107
Chain_Control * ready_chain
Definition: schedulerpriority.h:110
Priority_bit_map_Information Priority_map
Definition: schedulerpriority.h:113
Scheduler control.
Definition: scheduler.h:337
Objects_Control Object
Definition: thread.h:839
This union represents a chain control block.
Definition: chain.h:96