[PATCH 1/5] score: Simplify _Thread_Create_idle_for_CPU()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Aug 16 11:15:27 UTC 2021


Online processors have a scheduler assigned.
---
 cpukit/score/src/threadcreateidle.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index 395dcc9c12..f5ffc9bad8 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -38,13 +38,7 @@ static void _Thread_Create_idle_for_CPU( Per_CPU_Control *cpu )
 
   memset( &config, 0, sizeof( config ) );
   config.scheduler = _Scheduler_Get_by_CPU( cpu );
-
-#if defined(RTEMS_SMP)
-  if ( config.scheduler == NULL ) {
-    return;
-  }
-#endif
-
+  _Assert( config.scheduler != NULL );
   config.priority = _Scheduler_Map_priority(
     config.scheduler,
     config.scheduler->maximum_priority
-- 
2.26.2



More information about the devel mailing list