Hi,

Set the state of a secondary cpu to shutdown if multitasking returns.

Chris
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index e2cd546..355e2da 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -31,10 +31,9 @@
 void rtems_smp_secondary_cpu_initialize( void )
 {
   Per_CPU_Control *self_cpu = _Per_CPU_Get();
-  Thread_Control  *heir;
 
   #if defined(RTEMS_DEBUG)
-    printk( "Made it to %d -- ", _Per_CPU_Get_index( self_cpu ) );
+    printk( "core[%d]: initializing\n", _Per_CPU_Get_index( self_cpu ) );
   #endif
 
   _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING );
@@ -42,6 +41,12 @@ void rtems_smp_secondary_cpu_initialize( void )
   _Per_CPU_Wait_for_state( self_cpu, PER_CPU_STATE_BEGIN_MULTITASKING );
 
   _Thread_Start_multitasking( NULL );
+
+  _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN );
+
+  while (true) {
+    _CPU_SMP_Processor_event_receive();
+  }
 }
 
 void rtems_smp_process_interrupt( void )
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to