From 8a6de83fd833c4b0458ba27eb4883c53c1b1ecf4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 17 Feb 2014 10:10:27 +0100 Subject: score: Move _SMP_Request_other_cores_to_shutdown() Move _SMP_Request_other_cores_to_shutdown() invocation from rtems_shutdown_executive() to _Internal_error_Occurred() to allow a proper shutdown on SMP configurations even in the error case. --- cpukit/score/include/rtems/score/interr.h | 5 ++++- cpukit/score/include/rtems/score/smp.h | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'cpukit/score/include/rtems') diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index 2f5add4b54..2ee7109cf2 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -186,7 +186,10 @@ extern Internal_errors_Information _Internal_errors_What_happened; * - valid read-only data. * * For the initial extensions the read-write data (including BSS segment) is - * not required. + * not required on single processor configurations. On SMP configurations + * however the read-write data must be initialized since this function must + * determine the state of the other processors and request them to shut-down if + * necessary. * * Non-initial extensions require in addition valid read-write data. The BSP * may install an initial extension that performs a system reset. In this case diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h index 2fd915022f..b97cceda36 100644 --- a/cpukit/score/include/rtems/score/smp.h +++ b/cpukit/score/include/rtems/score/smp.h @@ -88,14 +88,19 @@ void _SMP_Broadcast_message( */ void _SMP_Request_other_cores_to_perform_first_context_switch(void); +#endif /* defined( RTEMS_SMP ) */ + /** * @brief Request other cores to shutdown. * * Send message to other cores requesting them to shutdown. */ -void _SMP_Request_other_cores_to_shutdown(void); - -#endif /* defined( RTEMS_SMP ) */ +#if defined( RTEMS_SMP ) + void _SMP_Request_other_cores_to_shutdown( void ); +#else + #define _SMP_Request_other_cores_to_shutdown() \ + do { } while ( 0 ) +#endif #endif /* !defined( ASM ) */ -- cgit v1.2.3