RTEMS: cpukit/include/rtems/score/interr.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
interr.h
Go to the documentation of this file.
1
12/*
13 * COPYRIGHT (c) 1989-2009.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_SCORE_INTERR_H
22#define _RTEMS_SCORE_INTERR_H
23
24#include <rtems/score/cpu.h>
25
39#ifdef __cplusplus
40extern "C" {
41#endif
42
47 typedef enum {
53 INTERNAL_ERROR_CORE = 0,
54
58 INTERNAL_ERROR_RTEMS_API = 1,
59
63 INTERNAL_ERROR_POSIX_API = 2,
64
70 RTEMS_FATAL_SOURCE_BDBUF = 3,
71
77 RTEMS_FATAL_SOURCE_APPLICATION = 4,
78
84 RTEMS_FATAL_SOURCE_EXIT = 5,
85
94 RTEMS_FATAL_SOURCE_BSP = 6,
95
103 RTEMS_FATAL_SOURCE_ASSERT = 7,
104
110 RTEMS_FATAL_SOURCE_STACK_CHECKER = 8,
111
119 RTEMS_FATAL_SOURCE_EXCEPTION = 9,
120
126 RTEMS_FATAL_SOURCE_SMP = 10,
127
133 RTEMS_FATAL_SOURCE_PANIC = 11,
134
140 RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE = 12,
141
147 RTEMS_FATAL_SOURCE_HEAP = 13,
148
155 RTEMS_FATAL_SOURCE_LAST = 0xffffffff
156} Internal_errors_Source;
157
165 typedef enum {
166 /* INTERNAL_ERROR_NO_CONFIGURATION_TABLE = 0, */
167 /* INTERNAL_ERROR_NO_CPU_TABLE = 1, */
168 INTERNAL_ERROR_TOO_LITTLE_WORKSPACE = 2,
169 /* INTERNAL_ERROR_WORKSPACE_ALLOCATION = 3, */
170 /* INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL = 4, */
171 INTERNAL_ERROR_THREAD_EXITTED = 5,
172 INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION = 6,
173 INTERNAL_ERROR_INVALID_NODE = 7,
174 INTERNAL_ERROR_NO_MPCI = 8,
175 INTERNAL_ERROR_BAD_PACKET = 9,
176 INTERNAL_ERROR_OUT_OF_PACKETS = 10,
177 INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS = 11,
178 INTERNAL_ERROR_OUT_OF_PROXIES = 12,
179 INTERNAL_ERROR_INVALID_GLOBAL_ID = 13,
180 INTERNAL_ERROR_BAD_STACK_HOOK = 14,
181 /* INTERNAL_ERROR_BAD_ATTRIBUTES = 15, */
182 /* INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY = 16, */
183 /* INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL = 17, */
184 /* INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_FROM_BAD_STATE = 18, */
185 /* INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 = 19, */
186 /* INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP = 20, */
187 INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21,
188 INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED = 22,
189 INTERNAL_ERROR_NO_MEMORY_FOR_HEAP = 23,
190 INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24,
191 INTERNAL_ERROR_RESOURCE_IN_USE = 25,
192 INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL = 26,
193 /* INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL = 27, */
194 INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK = 28,
195 INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE = 29,
196 INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL = 30,
197 INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT = 31,
198 INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED = 32,
199 INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED = 33,
200 /* INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED = 34, */
201 /* INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED = 35, */
202 INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36,
203 INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED = 37,
204 INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT = 38,
205 INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL = 39,
206 INTERNAL_ERROR_NO_MEMORY_FOR_PER_CPU_DATA = 40
207} Internal_errors_Core_list;
208
209typedef CPU_Uint32ptr Internal_errors_t;
210
214 typedef struct {
216 Internal_errors_Source the_source;
218 Internal_errors_t the_error;
219} Internal_errors_Information;
220
224extern Internal_errors_Information _Internal_errors_What_happened;
225
263void _Terminate(
264 Internal_errors_Source the_source,
265 Internal_errors_t the_error
266) RTEMS_NO_RETURN;
267
276void _Internal_error( Internal_errors_Core_list core_error ) RTEMS_NO_RETURN;
277
278#ifdef __cplusplus
279}
280#endif
281
284#endif
285/* end of include file */
RTEMS_NO_RETURN
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
CPU_Uint32ptr
uintptr_t CPU_Uint32ptr
Definition: cpu.h:662
_Internal_error
void _Internal_error(Internal_errors_Core_list core_error) RTEMS_NO_RETURN
Terminates the system with an INTERNAL_ERROR_CORE fatal source and the specified core error code.
Definition: interr.c:51
_Terminate
void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error) RTEMS_NO_RETURN
Initiates system termination.
Definition: interr.c:31
Internal_errors_Core_list
Internal_errors_Core_list
A list of errors which are generated internally by the executive core.
Definition: interr.h:165
Internal_errors_Source
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:47
_Internal_errors_What_happened
Internal_errors_Information _Internal_errors_What_happened
Definition: interr.c:29
RTEMS_FATAL_SOURCE_APPLICATION
@ RTEMS_FATAL_SOURCE_APPLICATION
Fatal source for application specific errors.
Definition: interr.h:77
RTEMS_FATAL_SOURCE_EXCEPTION
@ RTEMS_FATAL_SOURCE_EXCEPTION
Fatal source of the exceptions.
Definition: interr.h:119
RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
@ RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE
Fatal source for invalid C program heap frees via free().
Definition: interr.h:140
RTEMS_FATAL_SOURCE_ASSERT
@ RTEMS_FATAL_SOURCE_ASSERT
Fatal source of assert().
Definition: interr.h:103
INTERNAL_ERROR_CORE
@ INTERNAL_ERROR_CORE
Errors of the core system.
Definition: interr.h:53
RTEMS_FATAL_SOURCE_SMP
@ RTEMS_FATAL_SOURCE_SMP
Fatal source of SMP domain.
Definition: interr.h:126
RTEMS_FATAL_SOURCE_LAST
@ RTEMS_FATAL_SOURCE_LAST
The last available fatal source.
Definition: interr.h:155
RTEMS_FATAL_SOURCE_EXIT
@ RTEMS_FATAL_SOURCE_EXIT
Fatal source of exit().
Definition: interr.h:84
RTEMS_FATAL_SOURCE_PANIC
@ RTEMS_FATAL_SOURCE_PANIC
Fatal source of rtems_panic().
Definition: interr.h:133
RTEMS_FATAL_SOURCE_BDBUF
@ RTEMS_FATAL_SOURCE_BDBUF
Fatal source for the block device cache.
Definition: interr.h:70
RTEMS_FATAL_SOURCE_BSP
@ RTEMS_FATAL_SOURCE_BSP
Fatal source for BSP errors.
Definition: interr.h:94
INTERNAL_ERROR_POSIX_API
@ INTERNAL_ERROR_POSIX_API
Errors of the POSIX API.
Definition: interr.h:63
INTERNAL_ERROR_RTEMS_API
@ INTERNAL_ERROR_RTEMS_API
Errors of the RTEMS API.
Definition: interr.h:58
RTEMS_FATAL_SOURCE_HEAP
@ RTEMS_FATAL_SOURCE_HEAP
Fatal source for heap errors.
Definition: interr.h:147
RTEMS_FATAL_SOURCE_STACK_CHECKER
@ RTEMS_FATAL_SOURCE_STACK_CHECKER
Fatal source of the stack checker.
Definition: interr.h:110
Internal_errors_Information
Definition: interr.h:214
Internal_errors_Information::the_source
Internal_errors_Source the_source
Definition: interr.h:216
Internal_errors_Information::the_error
Internal_errors_t the_error
Definition: interr.h:218