forked from Imagelibrary/rtems
@@ -40,7 +40,7 @@ RTEMS_INLINE_ROUTINE Scheduler_CBS_Node *_Scheduler_CBS_Thread_get_node(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
return (Scheduler_CBS_Node *) _Scheduler_Thread_get_node( the_thread );
|
||||
return (Scheduler_CBS_Node *) _Thread_Scheduler_get_home_node( the_thread );
|
||||
}
|
||||
|
||||
RTEMS_INLINE_ROUTINE Scheduler_CBS_Node *_Scheduler_CBS_Node_downcast(
|
||||
|
||||
@@ -50,7 +50,7 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
return (Scheduler_EDF_Node *) _Scheduler_Thread_get_node( the_thread );
|
||||
return (Scheduler_EDF_Node *) _Thread_Scheduler_get_home_node( the_thread );
|
||||
}
|
||||
|
||||
RTEMS_INLINE_ROUTINE Scheduler_EDF_Node * _Scheduler_EDF_Node_downcast(
|
||||
|
||||
@@ -149,17 +149,6 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Release_critical(
|
||||
#endif
|
||||
}
|
||||
|
||||
RTEMS_INLINE_ROUTINE Scheduler_Node *_Scheduler_Thread_get_node(
|
||||
const Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
#if defined(RTEMS_SMP)
|
||||
return the_thread->Scheduler.node;
|
||||
#else
|
||||
return the_thread->Scheduler.nodes;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* The preferred method to add a new scheduler is to define the jump table
|
||||
* entries and add a case to the _Scheduler_Initialize routine.
|
||||
@@ -1326,7 +1315,6 @@ RTEMS_INLINE_ROUTINE Status_Control _Scheduler_Set(
|
||||
the_thread->Scheduler.own_control = new_scheduler;
|
||||
the_thread->Scheduler.control = new_scheduler;
|
||||
the_thread->Scheduler.own_node = new_scheduler_node;
|
||||
the_thread->Scheduler.node = new_scheduler_node;
|
||||
_Scheduler_Node_set_priority( new_scheduler_node, priority, false );
|
||||
|
||||
if ( _States_Is_ready( current_state ) ) {
|
||||
|
||||
@@ -45,7 +45,7 @@ RTEMS_INLINE_ROUTINE Scheduler_priority_Node *_Scheduler_priority_Thread_get_nod
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
{
|
||||
return (Scheduler_priority_Node *) _Scheduler_Thread_get_node( the_thread );
|
||||
return (Scheduler_priority_Node *) _Thread_Scheduler_get_home_node( the_thread );
|
||||
}
|
||||
|
||||
RTEMS_INLINE_ROUTINE Scheduler_priority_Node *_Scheduler_priority_Node_downcast(
|
||||
|
||||
@@ -48,7 +48,7 @@ static inline Scheduler_priority_SMP_Node *_Scheduler_priority_SMP_Thread_get_no
|
||||
Thread_Control *thread
|
||||
)
|
||||
{
|
||||
return (Scheduler_priority_SMP_Node *) _Scheduler_Thread_get_node( thread );
|
||||
return (Scheduler_priority_SMP_Node *) _Thread_Scheduler_get_home_node( thread );
|
||||
}
|
||||
|
||||
static inline Scheduler_priority_SMP_Node *
|
||||
|
||||
@@ -376,7 +376,7 @@ static inline Scheduler_SMP_Node *_Scheduler_SMP_Thread_get_node(
|
||||
Thread_Control *thread
|
||||
)
|
||||
{
|
||||
return (Scheduler_SMP_Node *) _Scheduler_Thread_get_node( thread );
|
||||
return (Scheduler_SMP_Node *) _Thread_Scheduler_get_home_node( thread );
|
||||
}
|
||||
|
||||
static inline Scheduler_SMP_Node *_Scheduler_SMP_Thread_get_own_node(
|
||||
|
||||
@@ -276,17 +276,6 @@ typedef struct {
|
||||
*/
|
||||
Scheduler_Node *own_node;
|
||||
|
||||
/**
|
||||
* @brief The scheduler node of this thread.
|
||||
*
|
||||
* On uni-processor configurations this field is constant after
|
||||
* initialization.
|
||||
*
|
||||
* On SMP configurations the scheduler helping protocol may change this
|
||||
* field.
|
||||
*/
|
||||
Scheduler_Node *node;
|
||||
|
||||
/**
|
||||
* @brief The processor assigned by the current scheduler.
|
||||
*/
|
||||
@@ -297,6 +286,9 @@ typedef struct {
|
||||
* scheduler instance and due to thread queue ownerships.
|
||||
*
|
||||
* This chain is protected by the thread wait lock.
|
||||
*
|
||||
* This chain is never empty. The first scheduler node on the chain is the
|
||||
* scheduler node of the home scheduler instance.
|
||||
*/
|
||||
Chain_Control Wait_nodes;
|
||||
|
||||
@@ -305,6 +297,9 @@ typedef struct {
|
||||
* thread.
|
||||
*
|
||||
* This chain is protected by the thread state lock.
|
||||
*
|
||||
* This chain is never empty. The first scheduler node on the chain is the
|
||||
* scheduler node of the home scheduler instance.
|
||||
*/
|
||||
Chain_Control Scheduler_nodes;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ _Scheduler_priority_affinity_SMP_Thread_get_node(
|
||||
)
|
||||
{
|
||||
return (Scheduler_priority_affinity_SMP_Node *)
|
||||
_Scheduler_Thread_get_node( thread );
|
||||
_Thread_Scheduler_get_home_node( thread );
|
||||
}
|
||||
|
||||
static Scheduler_priority_affinity_SMP_Node *
|
||||
|
||||
@@ -235,7 +235,6 @@ bool _Thread_Initialize(
|
||||
the_thread->Scheduler.own_control = scheduler;
|
||||
the_thread->Scheduler.control = scheduler;
|
||||
the_thread->Scheduler.own_node = scheduler_node;
|
||||
the_thread->Scheduler.node = scheduler_node;
|
||||
_ISR_lock_Initialize( &the_thread->Scheduler.Lock, "Thread Scheduler" );
|
||||
_ISR_lock_Initialize( &the_thread->Wait.Lock.Default, "Thread Wait Default" );
|
||||
_Thread_queue_Gate_open( &the_thread->Wait.Lock.Tranquilizer );
|
||||
|
||||
Reference in New Issue
Block a user