[rtems commit] score: Simplify _Thread_Create_idle_for_CPU()

Sebastian Huber sebh at rtems.org
Wed Aug 18 11:37:08 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Sat Aug  7 22:17:11 2021 +0200

score: Simplify _Thread_Create_idle_for_CPU()

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 395dcc9..f5ffc9b 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



More information about the vc mailing list