diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-17 15:33:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-18 07:16:27 +0200 |
commit | ffd46178c7a7bbf91b70a22eb6463b1e79dce560 (patch) | |
tree | e99e7abb4b437f23135c29024494b41c48295c4a /cpukit/score/src | |
parent | bsp/realview-pbx-a9: Support unassigned processors (diff) | |
download | rtems-ffd46178c7a7bbf91b70a22eb6463b1e79dce560.tar.bz2 |
score: Fix _Scheduler_EDF_SMP_Set_affinity()
Commit 8744498752ad4f0eaf9fb5640c6a0e0f2dc92fda broke the
_Scheduler_EDF_SMP_Set_affinity() implementation. We must test the
overall affinity against the online processors.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/scheduleredfsmp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cpukit/score/src/scheduleredfsmp.c b/cpukit/score/src/scheduleredfsmp.c index 102a33d4f7..0980a336cc 100644 --- a/cpukit/score/src/scheduleredfsmp.c +++ b/cpukit/score/src/scheduleredfsmp.c @@ -656,22 +656,20 @@ bool _Scheduler_EDF_SMP_Set_affinity( ) { Scheduler_Context *context; - Processor_mask a; - uint32_t count; + Processor_mask local_affinity; uint32_t rqi; context = _Scheduler_Get_context( scheduler ); - _Processor_mask_And( &a, &context->Processors, affinity ); - count = _Processor_mask_Count( &a ); + _Processor_mask_And( &local_affinity, &context->Processors, affinity ); - if ( count == 0 ) { + if ( _Processor_mask_Is_zero( &local_affinity ) ) { return false; } - if ( count == _SMP_Processor_count ) { + if ( _Processor_mask_Is_equal( affinity, &_SMP_Online_processors ) ) { rqi = 0; } else { - rqi = _Processor_mask_Find_last_set( &a ); + rqi = _Processor_mask_Find_last_set( &local_affinity ); } _Scheduler_SMP_Set_affinity( |