[PATCH 05/10] score: Avoid _Scheduler_Get_by_CPU_index( 0 )

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


Avoid use of processor index 0 which may have no scheduler assigned.
---
 cpukit/score/include/rtems/score/coremuteximpl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h
index 31d2a6e..e3da6a7 100644
--- a/cpukit/score/include/rtems/score/coremuteximpl.h
+++ b/cpukit/score/include/rtems/score/coremuteximpl.h
@@ -237,7 +237,7 @@ _CORE_ceiling_mutex_Get_scheduler(
 #if defined(RTEMS_SMP)
   return the_mutex->scheduler;
 #else
-  return _Scheduler_Get_by_CPU_index( 0 );
+  return &_Scheduler_Table[ 0 ];
 #endif
 }
 
-- 
1.8.4.5




More information about the devel mailing list