[rtems commit] score: Fix priority affinity SMP scheduler

Sebastian Huber sebh at rtems.org
Fri Jul 1 09:58:20 UTC 2016


Module:    rtems
Branch:    master
Commit:    4142f73762a3ced0128dca6766b4c0e094bb39e4
Changeset: http://git.rtems.org/rtems/commit/?id=4142f73762a3ced0128dca6766b4c0e094bb39e4

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul  1 11:50:41 2016 +0200

score: Fix priority affinity SMP scheduler

Bug introduced by 9bfad8cd519f17cbb26a672868169fcd304d5bd5.

---

 cpukit/score/src/schedulerpriorityaffinitysmp.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c
index 76b4601..cec0972 100644
--- a/cpukit/score/src/schedulerpriorityaffinitysmp.c
+++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c
@@ -306,10 +306,18 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations(
   Scheduler_Context *context
 )
 {
-  Scheduler_Node        *lowest_scheduled;
-  Scheduler_Node        *highest_ready;
+  Scheduler_priority_SMP_Context *self;
+  Scheduler_Node                 *lowest_scheduled;
+  Scheduler_Node                 *highest_ready;
+
+  self = _Scheduler_priority_SMP_Get_self( context );
 
   while (1) {
+    if ( _Priority_bit_map_Is_empty( &self->Bit_map ) ) {
+      /* Nothing to do */
+      break;
+    }
+
     highest_ready =
       _Scheduler_priority_affinity_SMP_Get_highest_ready( context, NULL );
 




More information about the vc mailing list