source: rtems/cpukit/rtems/include/rtems/rtems/types.h @ c6f7e060

4.104.115
Last change on this file since c6f7e060 was c6f7e060, checked in by Glenn Humphrey <glenn.humphrey@…>, on 12/02/09 at 18:15:16

2009-12-02 Glenn Humphrey <glenn.humphrey@…>

  • configure.ac, libcsupport/src/times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Changed the configuration of statistics granularity to use just one define.
  • Property mode set to 100644
File size: 4.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicRTEMS
5 *
6 * @brief Types used by the Classic API.
7 */
8
9/*  COPYRIGHT (c) 1989-2008.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_RTEMS_TYPES_H
20#define _RTEMS_RTEMS_TYPES_H
21
22/*
23 *  RTEMS basic type definitions
24 */
25
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/tod.h>
31#include <rtems/score/watchdog.h>
32#include <rtems/rtems/modes.h>
33#if defined(RTEMS_MULTIPROCESSING)
34#include <rtems/score/mpci.h>
35#include <rtems/score/mppkt.h>
36#endif
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/**
43 * @addtogroup ClassicRTEMS
44 *
45 * @{
46 */
47
48#ifdef RTEMS_DEPRECATED_TYPES
49/**
50 * @brief Single precision float type.
51 *
52 * @deprecated Use @c float instead.
53 */
54typedef single_precision rtems_single;
55
56/**
57 * @brief Double precision float type.
58 *
59 * @deprecated Use @c double instead.
60 */
61typedef double_precision rtems_double;
62
63/**
64 * @brief RTEMS boolean type.
65 *
66 * @deprecated Use @c bool instead
67 */
68typedef boolean          rtems_boolean;
69#endif
70
71/**
72 * @brief Classic API object name Type.
73 *
74 * Contains the name of a Classic API object. It is an unsigned 32 bit integer
75 * which can be treated as a numeric value or initialized using
76 * rtems_build_name() to contain four ASCII characters.
77 */
78typedef uint32_t         rtems_name;
79
80/**
81 * @brief Used to manage and manipulate RTEMS object identifier.
82 */
83typedef Objects_Id       rtems_id;
84
85/**
86 * @brief Invalid object identifier value.
87 *
88 * No object can have this identifier value.
89 */
90#define RTEMS_ID_NONE OBJECTS_ID_NONE
91
92/**
93 * @brief Public name for task context area.
94 */
95typedef Context_Control            rtems_context;
96
97#if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE)
98/**
99 * @brief Public name for task floating point context area.
100 */
101typedef Context_Control_fp         rtems_context_fp;
102#endif
103
104/**
105 * @brief Defines the format of the interrupt stack frame as it appears to a
106 * user ISR.
107 *
108 * This data structure may not be defined on all ports
109 */
110typedef CPU_Interrupt_frame        rtems_interrupt_frame;
111
112/**
113 * @brief Information structure returned by the Heap Handler via the Region
114 * Manager.
115 */
116typedef Heap_Information_block region_information_block;
117
118/**
119 * @brief Used to manage and manipulate intervals specified by clock ticks.
120 */
121typedef Watchdog_Interval rtems_interval;
122
123/**
124 * @brief Represents the CPU usage per thread.
125 *
126 * When using nano seconds granularity timing, RTEMS may internally use a
127 * variety of representations.
128 */
129#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
130  typedef struct timespec rtems_thread_cpu_usage_t;
131#else
132  typedef uint32_t rtems_thread_cpu_usage_t;
133#endif
134
135/**
136 * @brief Data structure to manage and manipulate calendar time.
137 */
138typedef 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 */
172typedef 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 */
182typedef MP_packet_Classes          rtems_mp_packet_classes;
183
184/**
185 * @brief Prefix found at the beginning of each MPCI packet sent between nodes.
186 */
187typedef MP_packet_Prefix           rtems_packet_prefix;
188
189/**
190 * @brief Indirect pointer to the initialization entry point for an MPCI
191 * handler.
192 */
193typedef MPCI_initialization_entry  rtems_mpci_initialization_entry;
194
195/**
196 * @brief Indirect pointer to the get_packet entry point for an MPCI handler.
197 */
198typedef 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 */
204typedef 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 */
209typedef MPCI_send_entry            rtems_mpci_send_packet_entry;
210
211/**
212 * @brief Indirect pointer to the receive entry point for an MPCI handler.
213 */
214typedef MPCI_receive_entry         rtems_mpci_receive_packet_entry;
215
216/**
217 * @brief Return type from every MPCI handler routine.
218 */
219typedef MPCI_Entry                 rtems_mpci_entry;
220
221/**
222 * @brief Structure which is used to configure an MPCI handler.
223 */
224typedef 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 */
Note: See TracBrowser for help on using the repository browser.