4.115
Last change
on this file since 9eec2f3 was
9eec2f3,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/14 at 12:46:11
|
score: Add RTEMS_FATAL_SOURCE_SMP
Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[f2f39b62] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
[bab16de2] | 4 | * @brief Implementation of rtems_fatal_source_text() |
---|
[f2f39b62] | 5 | * |
---|
| 6 | * @ingroup ClassicFatal |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
[bab16de2] | 10 | * Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved. |
---|
[f2f39b62] | 11 | * |
---|
| 12 | * embedded brains GmbH |
---|
[bab16de2] | 13 | * Dornierstr. 4 |
---|
[f2f39b62] | 14 | * 82178 Puchheim |
---|
| 15 | * Germany |
---|
| 16 | * <rtems@embedded-brains.de> |
---|
| 17 | * |
---|
| 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
| 20 | * http://www.rtems.com/license/LICENSE. |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #if HAVE_CONFIG_H |
---|
| 24 | #include "config.h" |
---|
| 25 | #endif |
---|
| 26 | |
---|
| 27 | #include <rtems/fatal.h> |
---|
| 28 | |
---|
[bab16de2] | 29 | static const char *const fatal_source_text[] = { |
---|
[f2f39b62] | 30 | "INTERNAL_ERROR_CORE", |
---|
| 31 | "INTERNAL_ERROR_RTEMS_API", |
---|
| 32 | "INTERNAL_ERROR_POSIX_API", |
---|
| 33 | "RTEMS_FATAL_SOURCE_BDBUF", |
---|
| 34 | "RTEMS_FATAL_SOURCE_APPLICATION", |
---|
| 35 | "RTEMS_FATAL_SOURCE_EXIT", |
---|
[33cb8bf] | 36 | "RTEMS_FATAL_SOURCE_BSP", |
---|
[f2f39b62] | 37 | "RTEMS_FATAL_SOURCE_ASSERT", |
---|
| 38 | "RTEMS_FATAL_SOURCE_STACK_CHECKER", |
---|
[9eec2f3] | 39 | "RTEMS_FATAL_SOURCE_EXCEPTION", |
---|
| 40 | "RTEMS_FATAL_SOURCE_SMP" |
---|
[f2f39b62] | 41 | }; |
---|
| 42 | |
---|
[bab16de2] | 43 | const char *rtems_fatal_source_text( rtems_fatal_source source ) |
---|
[f2f39b62] | 44 | { |
---|
| 45 | size_t i = source; |
---|
[bab16de2] | 46 | const char *text = "?"; |
---|
[f2f39b62] | 47 | |
---|
[bab16de2] | 48 | if ( i < RTEMS_ARRAY_SIZE( fatal_source_text ) ) { |
---|
| 49 | text = fatal_source_text[ i ]; |
---|
[f2f39b62] | 50 | } |
---|
| 51 | |
---|
[bab16de2] | 52 | return text; |
---|
[f2f39b62] | 53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.