1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Returns a text for an internal error code. |
---|
5 | * |
---|
6 | * @ingroup ClassicFatal |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2012-2014 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Dornierstr. 4 |
---|
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.org/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #if HAVE_CONFIG_H |
---|
24 | #include "config.h" |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <rtems/fatal.h> |
---|
28 | |
---|
29 | static const char *const internal_error_text[] = { |
---|
30 | "INTERNAL_ERROR_NO_CONFIGURATION_TABLE", |
---|
31 | "INTERNAL_ERROR_NO_CPU_TABLE", |
---|
32 | "INTERNAL_ERROR_TOO_LITTLE_WORKSPACE", |
---|
33 | "INTERNAL_ERROR_WORKSPACE_ALLOCATION", |
---|
34 | "INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL", |
---|
35 | "INTERNAL_ERROR_THREAD_EXITTED", |
---|
36 | "INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION", |
---|
37 | "INTERNAL_ERROR_INVALID_NODE", |
---|
38 | "INTERNAL_ERROR_NO_MPCI", |
---|
39 | "INTERNAL_ERROR_BAD_PACKET", |
---|
40 | "INTERNAL_ERROR_OUT_OF_PACKETS", |
---|
41 | "INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS", |
---|
42 | "INTERNAL_ERROR_OUT_OF_PROXIES", |
---|
43 | "INTERNAL_ERROR_INVALID_GLOBAL_ID", |
---|
44 | "INTERNAL_ERROR_BAD_STACK_HOOK", |
---|
45 | "INTERNAL_ERROR_BAD_ATTRIBUTES", |
---|
46 | "INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY", |
---|
47 | "INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL", |
---|
48 | "INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE", |
---|
49 | "INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0", |
---|
50 | "OBSOLETE_INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP", |
---|
51 | "INTERNAL_ERROR_GXX_KEY_ADD_FAILED", |
---|
52 | "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED", |
---|
53 | "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP", |
---|
54 | "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR" |
---|
55 | }; |
---|
56 | |
---|
57 | const char *rtems_internal_error_text( rtems_fatal_code error ) |
---|
58 | { |
---|
59 | size_t i = error; |
---|
60 | const char *text = "?"; |
---|
61 | |
---|
62 | if ( i < RTEMS_ARRAY_SIZE( internal_error_text ) ) { |
---|
63 | text = internal_error_text[ i ]; |
---|
64 | } |
---|
65 | |
---|
66 | return text; |
---|
67 | } |
---|