comparison src/nucleus/eri.c @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /*************************************************************************/
2 /* */
3 /* Copyright Mentor Graphics Corporation 2002 */
4 /* All Rights Reserved. */
5 /* */
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */
8 /* SUBJECT TO LICENSE TERMS. */
9 /* */
10 /*************************************************************************/
11
12 /*************************************************************************/
13 /* */
14 /* FILE NAME VERSION */
15 /* */
16 /* eri.c Nucleus PLUS 1.14 */
17 /* */
18 /* COMPONENT */
19 /* */
20 /* ER - Error Management */
21 /* */
22 /* DESCRIPTION */
23 /* */
24 /* This file contains the initialization routine for the Error */
25 /* Management component. */
26 /* */
27 /* DATA STRUCTURES */
28 /* */
29 /* None */
30 /* */
31 /* FUNCTIONS */
32 /* */
33 /* ERI_Initialize Error Management Initialize */
34 /* */
35 /* DEPENDENCIES */
36 /* */
37 /* er_extr.h Error management interfaces */
38 /* */
39 /* HISTORY */
40 /* */
41 /* DATE REMARKS */
42 /* */
43 /* 03-01-1993 Created initial version 1.0 */
44 /* 04-19-1993 Verified version 1.0 */
45 /* 03-01-1994 Replaced void with VOID, */
46 /* resulting in version 1.1 */
47 /* */
48 /* 03-18-1994 Verified version 1.1 */
49 /* 04-17-1996 updated to version 1.2 */
50 /* 03-24-1998 Released version 1.3. */
51 /* 03-26-1999 Released 1.11m (new release */
52 /* numbering scheme) */
53 /* 04-07-1999 Release 1.11mA */
54 /* 04-17-2002 Released version 1.13m */
55 /* 11-07-2002 Released version 1.14 */
56 /*************************************************************************/
57 #define NU_SOURCE_FILE
58
59
60 #include "er_extr.h" /* Error management interfaces */
61 #include "er_defs.h"
62
63 /* Define inter-component global data references. */
64
65 extern INT ERD_Error_Code;
66
67 #ifdef NU_DEBUG_MEMORY
68 extern UINT32 ERD_AllocationCount;
69 extern UINT32 ERD_AllocationSequenceCounter;
70 extern UINT32 ERD_TotalMemoryAllocated;
71 extern UINT32 ERD_TotalMemoryAllocations;
72 extern UINT32 ERD_MaxTotalMemoryAllocated;
73 extern UINT32 ERD_MaxTotalMemoryAllocations;
74
75 extern ER_DEBUG_ALLOCATION *ERD_RecentAllocation;
76 #endif /* NU_DEBUG_MEMORY */
77
78 #ifdef NU_DEBUG
79 extern UNSIGNED ERD_Assert_Count;
80 #endif
81
82 #ifdef NU_ERROR_STRING
83 extern CHAR ERD_Error_String[];
84 #endif
85
86 /*************************************************************************/
87 /* */
88 /* FUNCTION */
89 /* */
90 /* ERI_Initialize */
91 /* */
92 /* DESCRIPTION */
93 /* */
94 /* This function initializes the data structures of the Error */
95 /* management component (ER). */
96 /* */
97 /* CALLED BY */
98 /* */
99 /* INC_Initialize System initialization */
100 /* */
101 /* CALLS */
102 /* */
103 /* None */
104 /* */
105 /* INPUTS */
106 /* */
107 /* None */
108 /* */
109 /* OUTPUTS */
110 /* */
111 /* ERD_Error_Code Contains system error code */
112 /* ERD_Error_String ASCII error code string */
113 /* */
114 /* HISTORY */
115 /* */
116 /* DATE REMARKS */
117 /* */
118 /* 03-01-1993 Created initial version 1.0 */
119 /* 04-19-1993 Verified version 1.0 */
120 /* 03-01-1994 Replaced void with VOID, */
121 /* resulting in version 1.1 */
122 /* */
123 /* 03-18-1994 Verified version 1.1 */
124 /* */
125 /*************************************************************************/
126 VOID ERI_Initialize(VOID)
127 {
128
129 /* Clear the system error code flag. */
130 ERD_Error_Code = 0;
131
132 #ifdef NU_DEBUG_MEMORY
133 /* Clear variables that help find memory problems */
134 ERD_AllocationCount = 0;
135 ERD_AllocationSequenceCounter = 0;
136 ERD_TotalMemoryAllocated = 0;
137 ERD_TotalMemoryAllocations = 0;
138 ERD_MaxTotalMemoryAllocated = 0;
139 ERD_MaxTotalMemoryAllocations = 0;
140 ERD_RecentAllocation = 0;
141 #endif /* NU_DEBUG_MEMORY */
142
143 #ifdef NU_DEBUG
144 /* Clear count of failed assertions. */
145 ERD_Assert_Count = 0;
146 #endif
147
148 #ifdef NU_ERROR_STRING
149 /* Make the error string null. */
150 ERD_Error_String[0] = 0;
151 #endif
152 }
153
154
155
156