1 | /* system.h |
---|
2 | * |
---|
3 | * This include file contains information that is included in every |
---|
4 | * function in the executive. This must be the first include file |
---|
5 | * included in all internal RTEMS files. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * All rights assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
12 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
13 | * notice must appear in all copies of this file and its derivatives. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef __RTEMS_SYSTEM_h |
---|
19 | #define __RTEMS_SYSTEM_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | /* |
---|
26 | * The following define the CPU Family and Model within the family |
---|
27 | * |
---|
28 | * NOTE: The string "REPLACE_THIS_WITH_USE_INLINE_OR_MACROS" is replaced |
---|
29 | * with either "USE_INLINES" or "USE_MACROS" based upon the |
---|
30 | * whether this target configuration uses the inline or |
---|
31 | * macro implementations of the inlined RTEMS routines. |
---|
32 | */ |
---|
33 | |
---|
34 | |
---|
35 | #define REPLACE_THIS_WITH_USE_INLINE_OR_MACROS |
---|
36 | |
---|
37 | /* |
---|
38 | * The following insures that all data is declared in the space |
---|
39 | * of the Initialization Manager. It is referenced as "external" |
---|
40 | * in every other file. |
---|
41 | */ |
---|
42 | |
---|
43 | #ifdef INIT |
---|
44 | #undef EXTERN |
---|
45 | #define EXTERN |
---|
46 | #else |
---|
47 | #undef EXTERN |
---|
48 | #define EXTERN extern |
---|
49 | #endif |
---|
50 | |
---|
51 | /* |
---|
52 | * The following (in conjunction with compiler arguments) are used |
---|
53 | * to choose between the use of static inline functions and macro |
---|
54 | * functions. The static inline implementation allows better |
---|
55 | * type checking with no cost in code size or execution speed. |
---|
56 | */ |
---|
57 | |
---|
58 | #ifdef USE_INLINES |
---|
59 | #define STATIC static |
---|
60 | #define INLINE __inline__ |
---|
61 | #else |
---|
62 | /* |
---|
63 | #error Only the GNU C compiler is currently supported!!! |
---|
64 | */ |
---|
65 | #define STATIC |
---|
66 | #define INLINE |
---|
67 | #endif |
---|
68 | |
---|
69 | /* |
---|
70 | * Include a base set of files. |
---|
71 | */ |
---|
72 | |
---|
73 | /* |
---|
74 | * XXX: Eventually proc_ptr needs to disappear!!! |
---|
75 | */ |
---|
76 | |
---|
77 | typedef void * proc_ptr; |
---|
78 | |
---|
79 | #include <rtems/cpu.h> /* processor specific information */ |
---|
80 | #include <rtems/status.h> /* RTEMS status codes */ |
---|
81 | #include <rtems/directives.h> |
---|
82 | |
---|
83 | /* |
---|
84 | * Define NULL |
---|
85 | */ |
---|
86 | |
---|
87 | #ifndef NULL |
---|
88 | #define NULL 0 /* NULL value */ |
---|
89 | #endif |
---|
90 | |
---|
91 | /* |
---|
92 | * Boolean constants |
---|
93 | */ |
---|
94 | |
---|
95 | #if !defined( TRUE ) || (TRUE != 1) |
---|
96 | #undef TRUE |
---|
97 | #define TRUE (1) |
---|
98 | #endif |
---|
99 | |
---|
100 | #if !defined( FALSE ) || (FALSE != 0) |
---|
101 | #undef FALSE |
---|
102 | #define FALSE (0) |
---|
103 | #endif |
---|
104 | |
---|
105 | #define stringify( _x ) # _x |
---|
106 | |
---|
107 | #define RTEMS_offsetof(type, field) \ |
---|
108 | ((unsigned32) &(((type *) 0)->field)) |
---|
109 | |
---|
110 | /* |
---|
111 | * The following is the extern for the RTEMS version string. |
---|
112 | * The contents of this string are CPU specific. |
---|
113 | */ |
---|
114 | |
---|
115 | extern const char _RTEMS_version[]; /* RTEMS version string */ |
---|
116 | extern const char _Copyright_Notice[]; /* RTEMS copyright string */ |
---|
117 | |
---|
118 | /* |
---|
119 | * The jump table of entry points into RTEMS directives. |
---|
120 | */ |
---|
121 | |
---|
122 | extern const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ]; |
---|
123 | |
---|
124 | /* |
---|
125 | * The following defines the CPU dependent information table. |
---|
126 | */ |
---|
127 | |
---|
128 | EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ |
---|
129 | |
---|
130 | /* |
---|
131 | * XXX weird RTEMS stuff |
---|
132 | */ |
---|
133 | |
---|
134 | #define RTEMS_MAXIMUM_NAME_LENGTH 4 |
---|
135 | |
---|
136 | #ifdef __cplusplus |
---|
137 | } |
---|
138 | #endif |
---|
139 | |
---|
140 | #endif |
---|
141 | /* end of include file */ |
---|