From d4dc7c8196355f08044e67a3f5c1e19485f17ff1 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Thu, 26 May 2011 18:07:07 +0000 Subject: 2011-05-26 Jennifer Averett PR 1796/cpukit * sapi/src/exshutdown.c, score/include/rtems/score/percpu.h, score/include/rtems/score/smp.h, score/src/smp.c, score/src/threaddispatch.c, score/src/threadhandler.c: Added SMP interprocess communications. --- cpukit/score/src/threadhandler.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'cpukit/score/src/threadhandler.c') diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c index 37185ad745..84fe9c10d3 100644 --- a/cpukit/score/src/threadhandler.c +++ b/cpukit/score/src/threadhandler.c @@ -2,7 +2,7 @@ * Thread Handler * * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -51,6 +51,11 @@ #define EXECUTE_GLOBAL_CONSTRUCTORS #endif +#if defined(RTEMS_SMP) + #include +#endif + + /*PAGE * * _Thread_Handler @@ -138,8 +143,15 @@ void _Thread_Handler( void ) */ if (!doneCons) /* && (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 + #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = -- cgit v1.2.3