The other CPUs are not brought out of reset until this is executed. Did you see a case where the first thread is not executed on the first core?
Sebastian Huber <[email protected]> wrote: Do not assume that the scheduler selects the main processor for the initialization thread. --- cpukit/sapi/src/exinit.c | 4 ++++ cpukit/score/src/threadhandler.c | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 3fb27fd..4ee2471 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -223,6 +223,10 @@ void rtems_initialize_start_multitasking(void) _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); +#ifdef RTEMS_SMP + _SMP_Request_other_cores_to_perform_first_context_switch(); +#endif + _Thread_Start_multitasking(); /******************************************************************* diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c index 6367c45..e4f124c 100644 --- a/cpukit/score/src/threadhandler.c +++ b/cpukit/score/src/threadhandler.c @@ -126,12 +126,6 @@ void _Thread_Handler( void ) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); - - #if defined(RTEMS_SMP) - _Thread_Disable_dispatch(); - _SMP_Request_other_cores_to_perform_first_context_switch(); - _Thread_Enable_dispatch(); - #endif } #endif -- 1.7.7 _______________________________________________ rtems-devel mailing list [email protected] http://www.rtems.org/mailman/listinfo/rtems-devel _______________________________________________ rtems-devel mailing list [email protected] http://www.rtems.org/mailman/listinfo/rtems-devel
