1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @defgroup ClassicTypes Types |
---|
5 | * |
---|
6 | * @ingroup ClassicRTEMS |
---|
7 | * @brief Types used by Classic API. |
---|
8 | */ |
---|
9 | |
---|
10 | /* COPYRIGHT (c) 1989-2009. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef _RTEMS_RTEMS_TYPES_H |
---|
19 | #define _RTEMS_RTEMS_TYPES_H |
---|
20 | |
---|
21 | /* |
---|
22 | * RTEMS basic type definitions |
---|
23 | */ |
---|
24 | |
---|
25 | #include <sys/_timespec.h> |
---|
26 | #include <stdint.h> |
---|
27 | #include <rtems/score/heap.h> |
---|
28 | #include <rtems/score/object.h> |
---|
29 | #include <rtems/score/priority.h> |
---|
30 | #include <rtems/score/watchdog.h> |
---|
31 | #include <rtems/rtems/modes.h> |
---|
32 | #if defined(RTEMS_MULTIPROCESSING) |
---|
33 | #include <rtems/score/mpci.h> |
---|
34 | #endif |
---|
35 | |
---|
36 | #ifdef __cplusplus |
---|
37 | extern "C" { |
---|
38 | #endif |
---|
39 | |
---|
40 | /** |
---|
41 | * @addtogroup ClassicRTEMS |
---|
42 | */ |
---|
43 | /**@{**/ |
---|
44 | |
---|
45 | #ifdef RTEMS_DEPRECATED_TYPES |
---|
46 | /** |
---|
47 | * @brief Single precision float type. |
---|
48 | * |
---|
49 | * @deprecated Use @c float instead. |
---|
50 | */ |
---|
51 | typedef single_precision rtems_single RTEMS_DEPRECATED; |
---|
52 | |
---|
53 | /** |
---|
54 | * @brief Double precision float type. |
---|
55 | * |
---|
56 | * @deprecated Use @c double instead. |
---|
57 | */ |
---|
58 | typedef double_precision rtems_double RTEMS_DEPRECATED; |
---|
59 | |
---|
60 | /** |
---|
61 | * @brief RTEMS boolean type. |
---|
62 | * |
---|
63 | * @deprecated Use @c bool instead |
---|
64 | */ |
---|
65 | typedef boolean rtems_boolean RTEMS_DEPRECATED; |
---|
66 | #endif |
---|
67 | |
---|
68 | /** |
---|
69 | * @brief Classic API @ref ClassicRTEMSSubSecObjectNames "object name" type. |
---|
70 | * |
---|
71 | * Contains the name of a Classic API object. It is an unsigned 32-bit integer |
---|
72 | * which can be treated as a numeric value or initialized using |
---|
73 | * rtems_build_name() to contain four ASCII characters. |
---|
74 | */ |
---|
75 | typedef uint32_t rtems_name; |
---|
76 | |
---|
77 | /** |
---|
78 | * @brief Used to manage and manipulate |
---|
79 | * @ref ClassicRTEMSSubSecObjectIdentifiers "RTEMS object identifiers". |
---|
80 | */ |
---|
81 | typedef Objects_Id rtems_id; |
---|
82 | |
---|
83 | /** |
---|
84 | * @brief Invalid object identifier value. |
---|
85 | * |
---|
86 | * No object can have this identifier value. |
---|
87 | */ |
---|
88 | #define RTEMS_ID_NONE OBJECTS_ID_NONE |
---|
89 | |
---|
90 | /** |
---|
91 | * @brief Public name for task context area. |
---|
92 | */ |
---|
93 | typedef Context_Control rtems_context RTEMS_DEPRECATED; |
---|
94 | |
---|
95 | #if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE) |
---|
96 | /** |
---|
97 | * @brief Public name for task floating point context area. |
---|
98 | */ |
---|
99 | typedef Context_Control_fp rtems_context_fp RTEMS_DEPRECATED; |
---|
100 | #endif |
---|
101 | |
---|
102 | #if (CPU_ISR_PASSES_FRAME_POINTER == TRUE) |
---|
103 | /** |
---|
104 | * @brief Defines the format of the interrupt stack frame as it appears to a |
---|
105 | * user ISR. |
---|
106 | * |
---|
107 | * This data structure is only provided if the interrupt stack frame is passed |
---|
108 | * to the ISR handler. |
---|
109 | * |
---|
110 | * @see rtems_interrupt_catch(). |
---|
111 | */ |
---|
112 | typedef CPU_Interrupt_frame rtems_interrupt_frame; |
---|
113 | #endif |
---|
114 | |
---|
115 | /** |
---|
116 | * @brief Information structure returned by the Heap Handler via the Region |
---|
117 | * Manager. |
---|
118 | */ |
---|
119 | typedef Heap_Information_block region_information_block RTEMS_DEPRECATED; |
---|
120 | |
---|
121 | /** |
---|
122 | * @brief Used to manage and manipulate intervals specified by |
---|
123 | * @ref ClassicRTEMSSecTime "clock ticks". |
---|
124 | */ |
---|
125 | typedef Watchdog_Interval rtems_interval; |
---|
126 | |
---|
127 | /** |
---|
128 | * @brief Represents the CPU usage per thread. |
---|
129 | * |
---|
130 | * When using nanoseconds granularity timing, RTEMS may internally use a |
---|
131 | * variety of representations. |
---|
132 | */ |
---|
133 | typedef struct timespec rtems_thread_cpu_usage_t RTEMS_DEPRECATED; |
---|
134 | |
---|
135 | /** |
---|
136 | * @brief Data structure to manage and manipulate calendar |
---|
137 | * @ref ClassicRTEMSSecTime "time". |
---|
138 | */ |
---|
139 | typedef struct { |
---|
140 | /** |
---|
141 | * @brief Year, A.D. |
---|
142 | */ |
---|
143 | uint32_t year; |
---|
144 | /** |
---|
145 | * @brief Month, 1 .. 12. |
---|
146 | */ |
---|
147 | uint32_t month; |
---|
148 | /** |
---|
149 | * @brief Day, 1 .. 31. |
---|
150 | */ |
---|
151 | uint32_t day; |
---|
152 | /** |
---|
153 | * @brief Hour, 0 .. 23. |
---|
154 | */ |
---|
155 | uint32_t hour; |
---|
156 | /** |
---|
157 | * @brief Minute, 0 .. 59. |
---|
158 | */ |
---|
159 | uint32_t minute; |
---|
160 | /** |
---|
161 | * @brief Second, 0 .. 59. |
---|
162 | */ |
---|
163 | uint32_t second; |
---|
164 | /** |
---|
165 | * @brief Elapsed ticks between seconds. |
---|
166 | */ |
---|
167 | uint32_t ticks; |
---|
168 | } rtems_time_of_day; |
---|
169 | |
---|
170 | /* |
---|
171 | * MPCI related entries |
---|
172 | */ |
---|
173 | #if defined(RTEMS_MULTIPROCESSING) |
---|
174 | /** |
---|
175 | * @brief Set of MPCI packet classes which are internally dispatched to the |
---|
176 | * managers. |
---|
177 | */ |
---|
178 | typedef MP_packet_Classes rtems_mp_packet_classes; |
---|
179 | |
---|
180 | /** |
---|
181 | * @brief Prefix found at the beginning of each MPCI packet sent between nodes. |
---|
182 | */ |
---|
183 | typedef MP_packet_Prefix rtems_packet_prefix; |
---|
184 | |
---|
185 | /** |
---|
186 | * @brief Indirect pointer to the initialization entry point for an MPCI |
---|
187 | * handler. |
---|
188 | */ |
---|
189 | typedef MPCI_initialization_entry rtems_mpci_initialization_entry; |
---|
190 | |
---|
191 | /** |
---|
192 | * @brief Indirect pointer to the get_packet entry point for an MPCI handler. |
---|
193 | */ |
---|
194 | typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry; |
---|
195 | |
---|
196 | /** |
---|
197 | * @brief Indirect pointer to the return_packet entry point for an MPCI |
---|
198 | * handler. |
---|
199 | */ |
---|
200 | typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry; |
---|
201 | |
---|
202 | /** |
---|
203 | * @brief Indirect pointer to the send_packet entry point for an MPCI handler. |
---|
204 | */ |
---|
205 | typedef MPCI_send_entry rtems_mpci_send_packet_entry; |
---|
206 | |
---|
207 | /** |
---|
208 | * @brief Indirect pointer to the receive entry point for an MPCI handler. |
---|
209 | */ |
---|
210 | typedef MPCI_receive_entry rtems_mpci_receive_packet_entry; |
---|
211 | |
---|
212 | /** |
---|
213 | * @brief Return type from every MPCI handler routine. |
---|
214 | */ |
---|
215 | typedef MPCI_Entry rtems_mpci_entry; |
---|
216 | |
---|
217 | /** |
---|
218 | * @brief Structure which is used to configure an MPCI handler. |
---|
219 | */ |
---|
220 | typedef MPCI_Control rtems_mpci_table; |
---|
221 | |
---|
222 | #endif |
---|
223 | |
---|
224 | /** @} */ |
---|
225 | |
---|
226 | #ifdef __cplusplus |
---|
227 | } |
---|
228 | #endif |
---|
229 | |
---|
230 | #endif |
---|
231 | /* end of include file */ |
---|