comparison nuc-fw/nucleus/er_extr.h @ 79:947b1f473960

beginning of nuc-fw
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 11 Aug 2013 07:17:25 +0000
parents
children
comparison
equal deleted inserted replaced
78:2c266d4339ff 79:947b1f473960
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 /* er_extr.h Nucleus PLUS 1.14 */
17 /* */
18 /* COMPONENT */
19 /* */
20 /* ER - Error Management */
21 /* */
22 /* DESCRIPTION */
23 /* */
24 /* This file contains function prototypes of all functions */
25 /* accessible to other components. */
26 /* */
27 /* DATA STRUCTURES */
28 /* */
29 /* None */
30 /* */
31 /* FUNCTIONS */
32 /* */
33 /* None */
34 /* */
35 /* MACROS */
36 /* */
37 /* NU_CHECK */
38 /* NU_ASSERT */
39 /* */
40 /* DEPENDENCIES */
41 /* */
42 /* nucleus.h System definitions */
43 /* */
44 /* HISTORY */
45 /* */
46 /* DATE REMARKS */
47 /* */
48 /* 03-01-1993 Created initial version 1.0 */
49 /* 04-19-1993 Verified version 1.0 */
50 /* 03-01-1994 Moved include files outside of */
51 /* the file #ifndef to allow the */
52 /* use of actual data structures, */
53 /* resulting in version 1.1 */
54 /* */
55 /* 03-18-1994 Verified version 1.1 */
56 /* 04-17-1996 updated to version 1.2 */
57 /* 03-24-1998 Released version 1.3 */
58 /* 11-24-1998 Added NU_CHECK and NU_ASSERT. */
59 /* 03-26-1999 Released 1.11m (new release */
60 /* numbering scheme) */
61 /* 04-17-2002 Released version 1.13m */
62 /* 11-07-2002 Released version 1.14 */
63 /*************************************************************************/
64
65 #include "nucleus.h" /* Include system definitions */
66
67
68 /* Check to see if the file has been included already. */
69
70 #ifndef ER_EXTR
71 #define ER_EXTR
72
73
74 /* Initialization function. */
75
76 VOID ERI_Initialize(VOID);
77
78
79 /* System error handling function definition. */
80
81 VOID ERC_System_Error(INT error_code);
82
83 #ifdef NU_DEBUG_MEMORY
84
85 STATUS ERC_Allocate_Memory(NU_MEMORY_POOL *pool_ptr, VOID **ptr,
86 UNSIGNED size, UNSIGNED suspend,
87 unsigned long line, const char* file);
88
89 STATUS ERC_Deallocate_Memory(VOID *ptr);
90
91 #endif /* NU_DEBUG_MEMORY */
92
93 #ifdef NU_DEBUG
94
95 void ERC_Assert(CHAR *test, CHAR *name, UNSIGNED line);
96
97 #endif
98
99
100 #ifdef NU_ASSERT
101 #undef NU_ASSERT
102 #endif
103
104
105 #ifdef NU_CHECK
106 #undef NU_CHECK
107 #endif
108
109
110 #ifdef NU_DEBUG
111 #define NU_ASSERT( test ) \
112 if ( !(test) ) ERC_Assert( #test, __FILE__, __LINE__ ); ((void) 0)
113 #else
114 #define NU_ASSERT( test ) ((void) 0)
115 #endif /* NU_DEBUG */
116
117
118 #ifdef NU_DEBUG
119 #define NU_ASSERT2( test ) \
120 if ( !(test) ) ERC_Assert( #test, __FILE__, __LINE__ ); ((void) 0)
121 #else
122 #define NU_ASSERT2( test ) ((void) 0)
123 #endif /* NU_DEBUG */
124
125
126 #ifndef NU_NO_ERROR_CHECKING
127 #define NU_CHECK( test, statement ) \
128 NU_ASSERT2( test ); if ( !(test) ) { statement; } ((void) 0)
129 #else
130 #define NU_CHECK( test, statement ) NU_ASSERT2( test )
131 #endif /* NU_NO_ERROR_CHECKING */
132
133
134
135 #endif
136
137
138
139
140