From a420327390f920167524219cc85eb22175ea177b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 23 Oct 2014 15:39:28 +0200 Subject: sapi: Report only if not an SMP shutdown response --- cpukit/sapi/src/testextension.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/cpukit/sapi/src/testextension.c b/cpukit/sapi/src/testextension.c index 5221aaf7d6..814f1bd3a2 100644 --- a/cpukit/sapi/src/testextension.c +++ b/cpukit/sapi/src/testextension.c @@ -19,18 +19,38 @@ #include #include +#if defined(RTEMS_SMP) +#include +#endif + +#if defined(RTEMS_PROFILING) +static bool should_report( + rtems_fatal_source source, + rtems_fatal_code code +) +{ +#if defined(RTEMS_SMP) + return source != RTEMS_FATAL_SOURCE_SMP + || code != SMP_FATAL_SHUTDOWN_RESPONSE; +#else + (void) source; + (void) code; + + return true; +#endif +} +#endif + void rtems_test_fatal_extension( rtems_fatal_source source, bool is_internal, rtems_fatal_code code ) { - (void) source; (void) is_internal; - (void) code; #if defined(RTEMS_PROFILING) - if ( rtems_get_current_processor() == 0 ) { + if ( should_report( source, code ) ) { printk( "\n*** PROFILING REPORT BEGIN %s ***\n", rtems_test_name -- cgit v1.2.3