score: Add _Thread_Scheduler_add_wait_node()

Update #2556.
This commit is contained in:
Sebastian Huber
2016-09-23 10:46:49 +02:00
parent 1c9688a9a1
commit 36d7abad13
3 changed files with 15 additions and 8 deletions

View File

@@ -1034,6 +1034,19 @@ RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_node_by_index(
#endif
}
#if defined(RTEMS_SMP)
RTEMS_INLINE_ROUTINE void _Thread_Scheduler_add_wait_node(
Thread_Control *the_thread,
Scheduler_Node *scheduler_node
)
{
_Chain_Append_unprotected(
&the_thread->Scheduler.Wait_nodes,
&scheduler_node->Thread.Wait_node
);
}
#endif
/**
* @brief Returns the priority of the thread.
*

View File

@@ -50,10 +50,7 @@ static void _Thread_Priority_action_add(
scheduler_node = SCHEDULER_NODE_OF_WAIT_PRIORITY( priority_aggregation );
the_thread = arg;
_Chain_Append_unprotected(
&the_thread->Scheduler.Wait_nodes,
&scheduler_node->Thread.Wait_node
);
_Thread_Scheduler_add_wait_node( the_thread, scheduler_node );
_Thread_Set_scheduler_node_priority( priority_aggregation, false );
_Priority_Set_action_type( priority_aggregation, PRIORITY_ACTION_ADD );
_Priority_Actions_add( priority_actions, priority_aggregation );

View File

@@ -1207,10 +1207,7 @@ static void _Thread_queue_Priority_inherit_do_surrender_add(
scheduler_node = SCHEDULER_NODE_OF_WAIT_PRIORITY( priority_aggregation );
the_thread = arg;
_Chain_Append_unprotected(
&the_thread->Scheduler.Wait_nodes,
&scheduler_node->Thread.Wait_node
);
_Thread_Scheduler_add_wait_node( the_thread, scheduler_node );
_Scheduler_Node_set_priority(
scheduler_node,
_Priority_Get_priority( priority_aggregation ),