[PATCH 03/10] score: Fix _MRSP_Initialize()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 8 08:59:37 UTC 2016


The ceiling priorities must be initialized by scheduler index.  Do not
confuse it with a processor index.
---
 cpukit/score/include/rtems/score/mrspimpl.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h
index 96d88ad..6b00af4 100644
--- a/cpukit/score/include/rtems/score/mrspimpl.h
+++ b/cpukit/score/include/rtems/score/mrspimpl.h
@@ -209,13 +209,13 @@ RTEMS_INLINE_ROUTINE Status_Control _MRSP_Initialize(
   }
 
   for ( i = 0 ; i < scheduler_count ; ++i ) {
-    const Scheduler_Control *scheduler_of_cpu;
+    const Scheduler_Control *scheduler_of_index;
 
-    scheduler_of_cpu = _Scheduler_Get_by_CPU_index( i );
+    scheduler_of_index = &_Scheduler_Table[ i ];
 
-    if ( scheduler != scheduler_of_cpu ) {
+    if ( scheduler != scheduler_of_index ) {
       mrsp->ceiling_priorities[ i ] =
-        _Scheduler_Map_priority( scheduler_of_cpu, 0 );
+        _Scheduler_Map_priority( scheduler_of_index, 0 );
     } else {
       mrsp->ceiling_priorities[ i ] = ceiling_priority;
     }
-- 
1.8.4.5




More information about the devel mailing list