diff options
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/schedulerpriorityaffinitysmp.c | 25 | ||||
-rw-r--r-- | cpukit/score/src/schedulerprioritysmp.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/schedulersimplesmp.c | 6 |
3 files changed, 16 insertions, 21 deletions
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c index f1e2252b2e..49601d5642 100644 --- a/cpukit/score/src/schedulerpriorityaffinitysmp.c +++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c @@ -104,28 +104,22 @@ void _Scheduler_priority_affinity_SMP_Node_initialize( } /* - * This method is slightly different from _Scheduler_SMP_Allocate_processor() - * in that it does what it is asked to do. _Scheduler_SMP_Allocate_processor() - * attempts to prevent migrations but does not take into account affinity + * This method is slightly different from + * _Scheduler_SMP_Allocate_processor_lazy() in that it does what it is asked to + * do. _Scheduler_SMP_Allocate_processor_lazy() attempts to prevent migrations + * but does not take into account affinity */ static inline void _Scheduler_SMP_Allocate_processor_exact( - Scheduler_Context *context, - Scheduler_Node *scheduled, - Scheduler_Node *victim + Scheduler_Context *context, + Thread_Control *scheduled_thread, + Thread_Control *victim_thread ) { - Thread_Control *victim_thread = _Scheduler_Node_get_owner( victim ); - Thread_Control *scheduled_thread = _Scheduler_Node_get_owner( scheduled ); Per_CPU_Control *victim_cpu = _Thread_Get_CPU( victim_thread ); Per_CPU_Control *cpu_self = _Per_CPU_Get(); (void) context; - _Scheduler_SMP_Node_change_state( - _Scheduler_SMP_Node_downcast( scheduled ), - SCHEDULER_SMP_NODE_SCHEDULED - ); - _Thread_Set_CPU( scheduled_thread, victim_cpu ); _Thread_Dispatch_update_heir( cpu_self, victim_cpu, scheduled_thread ); } @@ -358,10 +352,11 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations( SCHEDULER_SMP_NODE_READY ); - _Scheduler_SMP_Allocate_processor_exact( + _Scheduler_SMP_Allocate_processor( context, highest_ready, - lowest_scheduled + lowest_scheduled, + _Scheduler_SMP_Allocate_processor_exact ); _Scheduler_priority_SMP_Move_from_ready_to_scheduled( diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c index f340b83b9d..f74eb1bb82 100644 --- a/cpukit/score/src/schedulerprioritysmp.c +++ b/cpukit/score/src/schedulerprioritysmp.c @@ -93,7 +93,7 @@ void _Scheduler_priority_SMP_Block( _Scheduler_priority_SMP_Extract_from_ready, _Scheduler_priority_SMP_Get_highest_ready, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -113,7 +113,7 @@ static void _Scheduler_priority_SMP_Enqueue_ordered( insert_scheduled, _Scheduler_priority_SMP_Move_from_scheduled_to_ready, _Scheduler_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -161,7 +161,7 @@ static void _Scheduler_priority_SMP_Enqueue_scheduled_ordered( insert_ready, insert_scheduled, _Scheduler_priority_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c index 4b0ce0a61c..da2b77a28e 100644 --- a/cpukit/score/src/schedulersimplesmp.c +++ b/cpukit/score/src/schedulersimplesmp.c @@ -175,7 +175,7 @@ void _Scheduler_simple_SMP_Block( _Scheduler_simple_SMP_Extract_from_ready, _Scheduler_simple_SMP_Get_highest_ready, _Scheduler_simple_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -195,7 +195,7 @@ static void _Scheduler_simple_SMP_Enqueue_ordered( insert_scheduled, _Scheduler_simple_SMP_Move_from_scheduled_to_ready, _Scheduler_SMP_Get_lowest_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } @@ -243,7 +243,7 @@ static void _Scheduler_simple_SMP_Enqueue_scheduled_ordered( insert_ready, insert_scheduled, _Scheduler_simple_SMP_Move_from_ready_to_scheduled, - _Scheduler_SMP_Allocate_processor + _Scheduler_SMP_Allocate_processor_lazy ); } |