1 | /* interr.h |
---|
2 | * |
---|
3 | * This include file contains constants and prototypes related |
---|
4 | * to the Internal Error Handler. |
---|
5 | * |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1998. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * Copyright assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef __RTEMS_INTERNAL_ERROR_h |
---|
19 | #define __RTEMS_INTERNAL_ERROR_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | /* |
---|
26 | * This type lists the possible sources from which an error |
---|
27 | * can be reported. |
---|
28 | */ |
---|
29 | |
---|
30 | typedef enum { |
---|
31 | INTERNAL_ERROR_CORE, |
---|
32 | INTERNAL_ERROR_RTEMS_API, |
---|
33 | INTERNAL_ERROR_POSIX_API |
---|
34 | } Internal_errors_Source; |
---|
35 | |
---|
36 | /* |
---|
37 | * A list of errors which are generated internally by the executive core. |
---|
38 | */ |
---|
39 | |
---|
40 | typedef enum { |
---|
41 | INTERNAL_ERROR_NO_CONFIGURATION_TABLE, |
---|
42 | INTERNAL_ERROR_NO_CPU_TABLE, |
---|
43 | INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS, |
---|
44 | INTERNAL_ERROR_TOO_LITTLE_WORKSPACE, |
---|
45 | INTERNAL_ERROR_WORKSPACE_ALLOCATION, |
---|
46 | INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL, |
---|
47 | INTERNAL_ERROR_THREAD_EXITTED, |
---|
48 | INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION, |
---|
49 | INTERNAL_ERROR_INVALID_NODE, |
---|
50 | INTERNAL_ERROR_NO_MPCI, |
---|
51 | INTERNAL_ERROR_BAD_PACKET, |
---|
52 | INTERNAL_ERROR_OUT_OF_PACKETS, |
---|
53 | INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS, |
---|
54 | INTERNAL_ERROR_OUT_OF_PROXIES, |
---|
55 | INTERNAL_ERROR_INVALID_GLOBAL_ID, |
---|
56 | INTERNAL_ERROR_BAD_STACK_HOOK |
---|
57 | } Internal_errors_Core_list; |
---|
58 | |
---|
59 | /* |
---|
60 | * This type holds the fatal error information. |
---|
61 | */ |
---|
62 | |
---|
63 | typedef struct { |
---|
64 | Internal_errors_Source the_source; |
---|
65 | boolean is_internal; |
---|
66 | unsigned32 the_error; |
---|
67 | } Internal_errors_Information; |
---|
68 | |
---|
69 | /* |
---|
70 | * When a fatal error occurs, the error information is stored here. |
---|
71 | */ |
---|
72 | |
---|
73 | SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened; |
---|
74 | |
---|
75 | /* |
---|
76 | * _Internal_error_Occurred |
---|
77 | * |
---|
78 | * DESCRIPTION: |
---|
79 | * |
---|
80 | * This routine is invoked when the application or the executive itself |
---|
81 | * determines that a fatal error has occurred. |
---|
82 | */ |
---|
83 | |
---|
84 | void volatile _Internal_error_Occurred( |
---|
85 | Internal_errors_Source the_source, |
---|
86 | boolean is_internal, |
---|
87 | unsigned32 the_error |
---|
88 | ); |
---|
89 | |
---|
90 | #ifdef __cplusplus |
---|
91 | } |
---|
92 | #endif |
---|
93 | |
---|
94 | #endif |
---|
95 | /* end of include file */ |
---|