Set secondary cpus to shutdown if multitasking returns.

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Aug 27 08:06:20 UTC 2013


On 2013-08-27 06:27, Chris Johns wrote:
> @@ -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();
> +  }

The _Thread_Start_multitasking( NULL ) doesn't return.  So you add dead code 
here.  To add the proper no-return attribute we have to eliminate 
_Thread_BSP_context.  I will do this if I have the time.  It makes it also 
possible to re-use the initialization stack.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list