28 static void _Thread_Set_scheduler_node_priority(
34 SCHEDULER_NODE_OF_WAIT_PRIORITY_NODE( priority_aggregation ),
40 #if defined(RTEMS_SMP) 41 static void _Thread_Priority_action_add(
50 scheduler_node = SCHEDULER_NODE_OF_WAIT_PRIORITY( priority_aggregation );
54 _Thread_Set_scheduler_node_priority( priority_aggregation,
false );
59 static void _Thread_Priority_action_remove(
68 scheduler_node = SCHEDULER_NODE_OF_WAIT_PRIORITY( priority_aggregation );
72 _Thread_Set_scheduler_node_priority( priority_aggregation,
true );
78 static void _Thread_Priority_action_change(
85 _Thread_Set_scheduler_node_priority( priority_aggregation, prepend_it );
86 #if defined(RTEMS_SMP) || defined(RTEMS_DEBUG) 92 static void _Thread_Priority_do_perform_actions(
112 priority_action_node = priority_aggregation->
Action.
node;
113 priority_action_type = priority_aggregation->
Action.
type;
115 switch ( priority_action_type ) {
116 case PRIORITY_ACTION_ADD:
117 #if defined(RTEMS_SMP) 119 priority_aggregation,
120 priority_action_node,
122 _Thread_Priority_action_add,
123 _Thread_Priority_action_change,
128 priority_aggregation,
129 priority_action_node,
131 _Thread_Priority_action_change,
136 case PRIORITY_ACTION_REMOVE:
137 #if defined(RTEMS_SMP) 139 priority_aggregation,
140 priority_action_node,
142 _Thread_Priority_action_remove,
143 _Thread_Priority_action_change,
148 priority_aggregation,
149 priority_action_node,
151 _Thread_Priority_action_change,
157 _Assert( priority_action_type == PRIORITY_ACTION_CHANGE );
159 priority_aggregation,
160 priority_action_node,
163 _Thread_Priority_action_change,
169 priority_aggregation = next_aggregation;
190 _Assert( start_of_path != NULL );
201 the_thread = start_of_path;
209 _Thread_Priority_do_perform_actions(
222 the_thread = queue->
owner;
239 static void _Thread_Priority_apply(
253 &scheduler_node->
Wait.Priority,
254 priority_action_node,
258 _Thread_Priority_do_perform_actions(
267 #if defined(RTEMS_SMP) 271 #if defined(RTEMS_SMP) 283 _Thread_Priority_apply(
298 _Thread_Priority_apply(
303 PRIORITY_ACTION_REMOVE
314 _Thread_Priority_apply(
319 PRIORITY_ACTION_CHANGE
333 &scheduler_node->
Wait.Priority,
350 for ( i = 0; i < n ; ++i ) {
361 #if defined(RTEMS_SMP) 364 int sticky_level_change
Thread_Control * owner
The thread queue owner.
The priority aggregation.
static __inline__ void _Priority_Non_empty_insert(Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Change_handler change, void *arg)
Inserts the node in a nonempty aggregation and handles change if the node is the new minimum...
static __inline__ void _Priority_Set_action_type(Priority_Aggregation *aggregation, Priority_Action_type type)
Sets the action type of the priority aggregation.
Thread_Wait_information Wait
Thread queue context for the thread queue methods.
The priority node to build up a priority aggregation.
Priority_Actions Actions
A priority action list.
Thread_Control * update[2]
Threads to update the priority via _Thread_Priority_update().
Inlined Routines Associated with the Manipulation of the Scheduler.
A list of priority actions.
struct Priority_Aggregation::@17 Action
A priority action block to manage priority node additions, changes and removals.
void _Thread_Priority_and_sticky_update(Thread_Control *the_thread, int sticky_level_change)
Updates the priority of the thread and changes it sticky level.
static __inline__ void _Thread_queue_Context_add_priority_update(Thread_queue_Context *queue_context, Thread_Control *the_thread)
Adds a priority update of the thread to the thread queue context.
static __inline__ void _Priority_Insert(Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Add_handler add, Priority_Change_handler change, void *arg)
static __inline__ void _Thread_State_release(Thread_Control *the_thread, ISR_lock_Context *lock_context)
Releases the lock context and enables interrupts.
bool _Thread_queue_Path_acquire_critical(Thread_queue_Queue *queue, Thread_Control *the_thread, Thread_queue_Context *queue_context)
Does nothing.
size_t update_count
Count of threads to update the priority via _Thread_Priority_update().
Information for the Assert Handler.
void _Thread_Priority_changed(Thread_Control *the_thread, Priority_Node *priority_node, bool prepend_it, Thread_queue_Context *queue_context)
Propagates a thread priority value change in the specified thread priority node to the corresponding ...
Priority_Action_type type
The type of the action.
static __inline__ void _Priority_Changed(Priority_Aggregation *aggregation, Priority_Node *node, bool prepend_it, Priority_Actions *actions, Priority_Change_handler change, void *arg)
Updates the priority of the node in the aggregation.
static __inline__ void _Priority_Replace(Priority_Aggregation *aggregation, Priority_Node *victim, Priority_Node *replacement)
Replaces one node by another.
struct Thread_queue_Context::@31 Priority
Block to manage thread priority changes due to a thread queue operation.
static __inline__ Scheduler_Node * _Thread_Scheduler_get_home_node(const Thread_Control *the_thread)
Gets the scheduler's home node.
static __inline__ Priority_Aggregation * _Priority_Actions_move(Priority_Actions *actions)
Moves the priority actions' actions.
static __inline__ void _Scheduler_Priority_and_sticky_update(Thread_Control *the_thread, int sticky_level_change)
Changes the sticky level of the home scheduler node and propagates a priority change of a thread to t...
Thread_queue_Priority_actions_operation priority_actions
Thread queue priority actions operation.
static __inline__ bool _Priority_Actions_is_valid(const Priority_Aggregation *aggregation)
Checks if the priority actions is valid.
void _Thread_Priority_replace(Thread_Control *the_thread, Priority_Node *victim_node, Priority_Node *replacement_node)
Replaces the victim priority node with the replacement priority node in the corresponding thread prio...
static __inline__ void _Thread_queue_Context_restore_priority_updates(Thread_queue_Context *queue_context, size_t update_count)
Sets the priority update count of the thread queue context.
void _Thread_Priority_update(Thread_queue_Context *queue_context)
Updates the priority of all threads in the set.
void _Thread_Priority_perform_actions(Thread_Control *start_of_path, Thread_queue_Context *queue_context)
Checks if the thread is owner of the lock of the join queue.
static __inline__ void _Priority_Extract_non_empty(Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Change_handler change, void *arg)
Extracts the node from the aggregation.
static __inline__ void _Priority_Actions_initialize_one(Priority_Actions *actions, Priority_Aggregation *aggregation, Priority_Node *node, Priority_Action_type type)
Initializes the priority actions with the given information.
struct Scheduler_Node::@20 Wait
Thread wait support block.
static __inline__ void _Scheduler_Update_priority(Thread_Control *the_thread)
Propagates a priority change of a thread to the scheduler.
static __inline__ void _Scheduler_Node_set_priority(Scheduler_Node *node, Priority_Control new_priority, bool prepend_it)
Sets the priority of the node.
static __inline__ void _Priority_Actions_add(Priority_Actions *actions, Priority_Aggregation *aggregation)
Adds actions to the priority actions' actions.
Scheduler node for per-thread data.
Inlined Routines from the Thread Handler.
static __inline__ Priority_Control _Priority_Get_priority(const Priority_Aggregation *aggregation)
Gets the priority aggregation's priority.
void _Thread_Priority_remove(Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
Removes the specified thread priority node from the corresponding thread priority aggregation...
static __inline__ size_t _Thread_queue_Context_save_priority_updates(Thread_queue_Context *queue_context)
Returns the priority update count of the thread queue context.
static __inline__ bool _Priority_Actions_is_empty(const Priority_Actions *actions)
Checks if the priority actions is empty.
static __inline__ void _Thread_Scheduler_remove_wait_node(Thread_Control *the_thread, Scheduler_Node *scheduler_node)
Remove a wait node from the thread and add a corresponding request to it.
Local ISR lock context for acquire and release pairs.
Priority_Node * node
The priority node of the action.
void _Thread_queue_Path_release_critical(Thread_queue_Context *queue_context)
Releases the thread queue path in a critical section.
Priority_Action_type
The priority action type.
void _Thread_Priority_add(Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
Adds the specified thread priority node to the corresponding thread priority aggregation.
static __inline__ void _Thread_State_acquire(Thread_Control *the_thread, ISR_lock_Context *lock_context)
Disables interrupts and acquires the lock_context.
static __inline__ void _Priority_Extract(Priority_Aggregation *aggregation, Priority_Node *node, Priority_Actions *actions, Priority_Remove_handler remove, Priority_Change_handler change, void *arg)
Extracts the node from the aggregation.
static __inline__ Priority_Aggregation * _Priority_Get_next_action(const Priority_Aggregation *aggregation)
Gets the next action of the priority aggregation.
static __inline__ void _Thread_Scheduler_add_wait_node(Thread_Control *the_thread, Scheduler_Node *scheduler_node)
Adds a wait node to the thread and adds a corresponding request to the thread.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.