summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/headers/interr.h
blob: 3d315473b07c11ab1262abe74c224c8c5dae8451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*  interr.h
 *
 *  This include file contains constants and prototypes related
 *  to the Internal Error Handler. 
 *
 *
 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
 *  On-Line Applications Research Corporation (OAR).
 *  All rights assigned to U.S. Government, 1994.
 *
 *  This material may be reproduced by or for the U.S. Government pursuant
 *  to the copyright license under the clause at DFARS 252.227-7013.  This
 *  notice must appear in all copies of this file and its derivatives.
 *
 *  $Id$
 */

#ifndef __RTEMS_INTERNAL_ERROR_h
#define __RTEMS_INTERNAL_ERROR_h

#ifdef __cplusplus
extern "C" {
#endif

/*
 *  This type lists the possible sources from which an error
 *  can be reported.
 */

typedef enum {
  INTERNAL_ERROR_CORE,
  INTERNAL_ERROR_RTEMS_API,
  INTERNAL_ERROR_POSIX_API
} Internal_errors_Source;

/*
 *  A list of errors which are generated internally by the executive core.
 */

typedef enum {
  INTERNAL_ERROR_NO_CONFIGURATION_TABLE,
  INTERNAL_ERROR_NO_CPU_TABLE,
  INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS,
  INTERNAL_ERROR_TOO_LITTLE_WORKSPACE,
  INTERNAL_ERROR_WORKSPACE_ALLOCATION,
  INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL,
  INTERNAL_ERROR_THREAD_EXITTED,
  INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION,
  INTERNAL_ERROR_INVALID_NODE,
  INTERNAL_ERROR_NO_MPCI,
  INTERNAL_ERROR_BAD_PACKET,
  INTERNAL_ERROR_OUT_OF_PACKETS,
  INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS,
  INTERNAL_ERROR_OUT_OF_PROXIES,
  INTERNAL_ERROR_INVALID_GLOBAL_ID,
  INTERNAL_ERROR_BAD_STACK_HOOK
} Internal_errors_Core_list;

/*
 *  This type holds the fatal error information.
 */
 
typedef struct {
  Internal_errors_Source  the_source;
  boolean                 is_internal;
  unsigned32              the_error;
} Internal_errors_Information;

/*
 *  When a fatal error occurs, the error information is stored here.
 */

SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened;

/*
 *  _Internal_error_Occurred
 *
 *  DESCRIPTION:
 *
 *  This routine is invoked when the application or the executive itself
 *  determines that a fatal error has occurred.
 */

void volatile _Internal_error_Occurred(
  Internal_errors_Source  the_source,
  boolean                 is_internal,
  unsigned32              the_error
);

#ifdef __cplusplus
}
#endif

#endif
/* end of include file */