source: rtems/cpukit/sapi/src/interrtext.c @ 599d71f

Last change on this file since 599d71f was fe100e16, checked in by Sebastian Huber <sebastian.huber@…>, on Dec 22, 2015 at 8:13:08 AM

score: Add fatal errors for NULL entry init tasks

This simplifies the global construction.

Update #2514.

  • Property mode set to 100644
File size: 1.9 KB
Line 
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-2015 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
29static 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  "OBSOLETE_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  "INTERNAL_ERROR_RESOURCE_IN_USE",
56  "INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL",
57  "INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL"
58};
59
60const char *rtems_internal_error_text( rtems_fatal_code error )
61{
62  size_t i = error;
63  const char *text = "?";
64
65  if ( i < RTEMS_ARRAY_SIZE( internal_error_text ) ) {
66    text = internal_error_text[ i ];
67  }
68
69  return text;
70}
Note: See TracBrowser for help on using the repository browser.