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