summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-23 15:39:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-10-23 15:39:28 +0200
commita420327390f920167524219cc85eb22175ea177b (patch)
treed8c503ba7eba3af85922ce596502bd5d31da3713
parentbsps/sparc: Include right header file (diff)
downloadrtems-a420327390f920167524219cc85eb22175ea177b.tar.bz2
sapi: Report only if not an SMP shutdown response
-rw-r--r--cpukit/sapi/src/testextension.c26
1 files 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 <rtems/test.h>
#include <rtems/profiling.h>
+#if defined(RTEMS_SMP)
+#include <rtems/score/smpimpl.h>
+#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