[dc6e830] | 1 | /* |
---|
| 2 | * Copyright (c) 2012 embedded brains GmbH. All rights reserved. |
---|
| 3 | * |
---|
| 4 | * embedded brains GmbH |
---|
| 5 | * Obere Lagerstr. 30 |
---|
| 6 | * 82178 Puchheim |
---|
| 7 | * Germany |
---|
| 8 | * <rtems@embedded-brains.de> |
---|
| 9 | * |
---|
| 10 | * The license and distribution terms for this file may be |
---|
| 11 | * found in the file LICENSE in this distribution or at |
---|
| 12 | * http://www.rtems.com/license/LICENSE. |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | #if HAVE_CONFIG_H |
---|
| 16 | #include "config.h" |
---|
| 17 | #endif |
---|
| 18 | |
---|
| 19 | #include <rtems/fatal.h> |
---|
| 20 | |
---|
| 21 | static const char *const internal_error_desc [] = { |
---|
| 22 | "INTERNAL_ERROR_NO_CONFIGURATION_TABLE", |
---|
| 23 | "INTERNAL_ERROR_NO_CPU_TABLE", |
---|
| 24 | "INTERNAL_ERROR_TOO_LITTLE_WORKSPACE", |
---|
| 25 | "INTERNAL_ERROR_WORKSPACE_ALLOCATION", |
---|
| 26 | "INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL", |
---|
| 27 | "INTERNAL_ERROR_THREAD_EXITTED", |
---|
| 28 | "INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION", |
---|
| 29 | "INTERNAL_ERROR_INVALID_NODE", |
---|
| 30 | "INTERNAL_ERROR_NO_MPCI", |
---|
| 31 | "INTERNAL_ERROR_BAD_PACKET", |
---|
| 32 | "INTERNAL_ERROR_OUT_OF_PACKETS", |
---|
| 33 | "INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS", |
---|
| 34 | "INTERNAL_ERROR_OUT_OF_PROXIES", |
---|
| 35 | "INTERNAL_ERROR_INVALID_GLOBAL_ID", |
---|
| 36 | "INTERNAL_ERROR_BAD_STACK_HOOK", |
---|
| 37 | "INTERNAL_ERROR_BAD_ATTRIBUTES", |
---|
| 38 | "INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY", |
---|
| 39 | "INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL", |
---|
| 40 | "INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE", |
---|
| 41 | "INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0", |
---|
| 42 | "INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP", |
---|
| 43 | "INTERNAL_ERROR_GXX_KEY_ADD_FAILED", |
---|
| 44 | "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED", |
---|
[b31a960] | 45 | "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP", |
---|
| 46 | "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR" |
---|
[dc6e830] | 47 | }; |
---|
| 48 | |
---|
| 49 | const char *rtems_internal_error_description( rtems_fatal_code error ) |
---|
| 50 | { |
---|
| 51 | size_t i = error; |
---|
| 52 | const char *desc = "?"; |
---|
| 53 | |
---|
| 54 | if ( i < RTEMS_ARRAY_SIZE( internal_error_desc ) ) { |
---|
| 55 | desc = internal_error_desc [i]; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | return desc; |
---|
| 59 | } |
---|