summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-29 14:45:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 11:00:28 +0100
commitd0434b886332fab34ad5dca292de3a2db90e0615 (patch)
treec0873866ededfe20d789eaed10a776f705370426 /cpukit/score
parentscore: Move _Scheduler_Unblock_node() (diff)
downloadrtems-d0434b886332fab34ad5dca292de3a2db90e0615.tar.bz2
score: Remove victim thread from CPU allocation
Update #4531.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/src/scheduleredfsmp.c22
-rw-r--r--cpukit/score/src/schedulerstrongapa.c10
2 files changed, 12 insertions, 20 deletions
diff --git a/cpukit/score/src/scheduleredfsmp.c b/cpukit/score/src/scheduleredfsmp.c
index 7a1c3c598d..3de3be11a0 100644
--- a/cpukit/score/src/scheduleredfsmp.c
+++ b/cpukit/score/src/scheduleredfsmp.c
@@ -478,46 +478,42 @@ static inline void _Scheduler_EDF_SMP_Release_idle(
static inline void _Scheduler_EDF_SMP_Allocate_processor(
Scheduler_Context *context,
Scheduler_Node *scheduled_base,
- Thread_Control *victim_thread,
- Per_CPU_Control *victim_cpu
+ Per_CPU_Control *cpu
)
{
Scheduler_EDF_SMP_Context *self;
Scheduler_EDF_SMP_Node *scheduled;
uint8_t rqi;
- (void) victim_thread;
self = _Scheduler_EDF_SMP_Get_self( context );
scheduled = _Scheduler_EDF_SMP_Node_downcast( scheduled_base );
rqi = scheduled->ready_queue_index;
if ( rqi != 0 ) {
- Per_CPU_Control *desired_cpu;
+ Per_CPU_Control *affine_cpu;
- desired_cpu = _Per_CPU_Get_by_index( rqi - 1 );
+ affine_cpu = _Per_CPU_Get_by_index( rqi - 1 );
- if ( victim_cpu != desired_cpu ) {
+ if ( cpu != affine_cpu ) {
Scheduler_EDF_SMP_Node *node;
node = _Scheduler_EDF_SMP_Get_allocated( self, rqi );
_Assert( node->ready_queue_index == 0 );
- _Scheduler_EDF_SMP_Set_allocated( self, node, victim_cpu );
+ _Scheduler_EDF_SMP_Set_allocated( self, node, cpu );
_Scheduler_SMP_Allocate_processor_exact(
context,
&node->Base.Base,
- NULL,
- victim_cpu
+ cpu
);
- victim_cpu = desired_cpu;
+ cpu = affine_cpu;
}
}
- _Scheduler_EDF_SMP_Set_allocated( self, scheduled, victim_cpu );
+ _Scheduler_EDF_SMP_Set_allocated( self, scheduled, cpu );
_Scheduler_SMP_Allocate_processor_exact(
context,
&scheduled->Base.Base,
- NULL,
- victim_cpu
+ cpu
);
}
diff --git a/cpukit/score/src/schedulerstrongapa.c b/cpukit/score/src/schedulerstrongapa.c
index 36ceaeddc1..265ef1a797 100644
--- a/cpukit/score/src/schedulerstrongapa.c
+++ b/cpukit/score/src/schedulerstrongapa.c
@@ -157,25 +157,21 @@ static inline Scheduler_Node *_Scheduler_strong_APA_Get_scheduled(
static inline void _Scheduler_strong_APA_Allocate_processor(
Scheduler_Context *context,
Scheduler_Node *scheduled_base,
- Thread_Control *victim_thread,
- Per_CPU_Control *victim_cpu
+ Per_CPU_Control *cpu
)
{
Scheduler_strong_APA_Node *scheduled;
Scheduler_strong_APA_Context *self;
- (void) victim_thread;
-
scheduled = _Scheduler_strong_APA_Node_downcast( scheduled_base );
self = _Scheduler_strong_APA_Get_self( context );
- _Scheduler_strong_APA_Set_scheduled( self, scheduled_base, victim_cpu );
+ _Scheduler_strong_APA_Set_scheduled( self, scheduled_base, cpu );
_Scheduler_SMP_Allocate_processor_exact(
context,
&( scheduled->Base.Base ),
- NULL,
- victim_cpu
+ cpu
);
}