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 | # ifdef __GNUC__ |
---|
61 | # define INLINE __inline__ |
---|
62 | # else |
---|
63 | # define INLINE inline |
---|
64 | # endif |
---|
65 | #else |
---|
66 | # define STATIC |
---|
67 | # define INLINE |
---|
68 | #endif |
---|
69 | |
---|
70 | /* |
---|
71 | * Include a base set of files. |
---|
72 | */ |
---|
73 | |
---|
74 | /* |
---|
75 | * XXX: Eventually proc_ptr needs to disappear!!! |
---|
76 | */ |
---|
77 | |
---|
78 | typedef void * proc_ptr; |
---|
79 | |
---|
80 | #include <rtems/score/cpu.h> /* processor specific information */ |
---|
81 | |
---|
82 | /* |
---|
83 | * Define NULL |
---|
84 | */ |
---|
85 | |
---|
86 | #ifndef NULL |
---|
87 | #define NULL 0 /* NULL value */ |
---|
88 | #endif |
---|
89 | |
---|
90 | /* |
---|
91 | * Boolean constants |
---|
92 | */ |
---|
93 | |
---|
94 | #if !defined( TRUE ) || (TRUE != 1) |
---|
95 | #undef TRUE |
---|
96 | #define TRUE (1) |
---|
97 | #endif |
---|
98 | |
---|
99 | #if !defined( FALSE ) || (FALSE != 0) |
---|
100 | #undef FALSE |
---|
101 | #define FALSE (0) |
---|
102 | #endif |
---|
103 | |
---|
104 | #define stringify( _x ) # _x |
---|
105 | |
---|
106 | #define RTEMS_offsetof(type, field) \ |
---|
107 | ((unsigned32) &(((type *) 0)->field)) |
---|
108 | |
---|
109 | /* |
---|
110 | * The following is the extern for the RTEMS version string. |
---|
111 | * The contents of this string are CPU specific. |
---|
112 | */ |
---|
113 | |
---|
114 | extern const char _RTEMS_version[]; /* RTEMS version string */ |
---|
115 | extern const char _Copyright_Notice[]; /* RTEMS copyright string */ |
---|
116 | |
---|
117 | /* |
---|
118 | * The following defines the CPU dependent information table. |
---|
119 | */ |
---|
120 | |
---|
121 | EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ |
---|
122 | |
---|
123 | /* |
---|
124 | * XXX weird RTEMS stuff |
---|
125 | */ |
---|
126 | |
---|
127 | #define RTEMS_MAXIMUM_NAME_LENGTH 4 |
---|
128 | |
---|
129 | #ifdef __cplusplus |
---|
130 | } |
---|
131 | #endif |
---|
132 | |
---|
133 | #endif |
---|
134 | /* end of include file */ |
---|