summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems.h
blob: 4bc89d704e6c2f8ba15c9e831f39193097207f67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/**
 * @file  rtems.h
 *
 *  This include file provides the public interface to the RTEMS Classic
 *  API.
 */

/*  COPYRIGHT (c) 1989-2008.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.com/license/LICENSE.
 *
 *  $Id$
 */

#ifndef _RTEMS_H
#define _RTEMS_H

/**
 *  @defgroup ClassicRTEMS Classic API RTEMS Header
 *
 *  This encapsulates functionality which is specific to the Classic API
 *  and generally shared across the various object classes.
 */
/**@{*/

#ifdef __cplusplus
extern "C" {
#endif

#if (!defined(__RTEMS_VIOLATE_KERNEL_VISIBILITY__)) && \
    (!defined(__RTEMS_INSIDE__))
/**
 *  @brief Compiling RTEMS Application Macro
 *
 *  Unless told otherwise, the RTEMS include files will hide some stuff
 *  from normal application code.  Defining this crosses a boundary which
 *  is undesirable since it means your application is using RTEMS features
 *  which are not included in the formally defined and supported API.
 *  Define this at your own risk.
 */
#define __RTEMS_APPLICATION__
#endif

#include <rtems/system.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>

#include <rtems/config.h>
#include <rtems/init.h>
#include <rtems/rtems/options.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/intr.h>
#include <rtems/rtems/barrier.h>
#include <rtems/rtems/cache.h>
#include <rtems/rtems/clock.h>
#include <rtems/extension.h>
#include <rtems/rtems/timer.h>
#include <rtems/rtems/sem.h>
#include <rtems/rtems/message.h>
#include <rtems/rtems/event.h>
#include <rtems/rtems/signal.h>
#include <rtems/rtems/event.h>
#include <rtems/rtems/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/region.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/io.h>
#include <rtems/fatal.h>
#include <rtems/rtems/ratemon.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/mp.h>
#endif

#include <rtems/rtems/support.h>
#include <rtems/score/sysstate.h>

/**
 *  @brief Obtain the RTEMS Version String
 *
 *  This method may be used to obtain the RTEMS version string.
 *
 *  @return This method returns a pointer to the version string.
 */
const char *rtems_get_version_string(void);

/**
 *  This constant indicates whether this processor variant has
 *  hardware floating point support.
 */
#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP

/**********************************************************************
 *      CONSTANTS WHICH MAY BE USED IN OBJECT NAME TO ID SEARCHES
 **********************************************************************/ 

/**
 * This constant indicates that the search is across all nodes.
 */
#define RTEMS_SEARCH_ALL_NODES   OBJECTS_SEARCH_ALL_NODES

/**
 *  This constant indicates that the search is across all nodes
 *  except the one the call is made from.
 */
#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES

/**
 *  This constant indicates that the search is to be restricted
 *  to the local node.
 */
#define RTEMS_SEARCH_LOCAL_NODE  OBJECTS_SEARCH_LOCAL_NODE

/**
 *  This constant indicates that the caller wants to obtain the
 *  name of the currently executing thread.
 *
 *  @note This constant is only meaningful when obtaining the name
 *        of a task.
 */
#define RTEMS_WHO_AM_I           OBJECTS_WHO_AM_I

/**********************************************************************
 *        Parameters and return Id's for _Objects_Get_next
 **********************************************************************/ 

/**
 *  This constant is the lowest valid valid for the index portion
 *  of an object Id.
 */
#define RTEMS_OBJECT_ID_INITIAL_INDEX        OBJECTS_ID_INITIAL_INDEX

/**
 *  This constant is the maximum valid valid for the index portion
 *  of an object Id.
 */
#define RTEMS_OBJECT_ID_FINAL_INDEX          OBJECTS_ID_FINAL_INDEX

/**
 *  This method returns the Id of the object with the lowest
 *  valid index valud.
 *
 *  @param[in] _api is the API of the object
 *  @param[in] _class is the Object Class of the object
 *  @param[in] _node is the node where the object resides
 */
#define RTEMS_OBJECT_ID_INITIAL(_api, _class, _node) \
   OBJECTS_ID_INITIAL(_api, _class, _node)

/**
 *  This constant is the maximum valid object Id.
 */
#define RTEMS_OBJECT_ID_FINAL                OBJECTS_ID_FINAL

/**
 *  The following constant defines the minimum stack size which every
 *  thread must exceed.
 */
#define RTEMS_MINIMUM_STACK_SIZE  STACK_MINIMUM_SIZE

/**
 *  The following constant is used to specify that the task should
 *  be created with the configured minimum stack size.
 */
#define RTEMS_CONFIGURED_MINIMUM_STACK_SIZE  0

/**
 *  Constant for indefinite wait.  (actually an illegal interval)
 */
#define RTEMS_NO_TIMEOUT  WATCHDOG_NO_TIMEOUT

/**
 *  An MPCI must support packets of at least this size.
 */
#define RTEMS_MINIMUM_PACKET_SIZE  MP_PACKET_MINIMUM_PACKET_SIZE

/**
 *  The following constant defines the number of uint32_t's
 *  in a packet which must be converted to native format in a
 *  heterogeneous system.  In packets longer than
 *  MP_PACKET_MINIMUN_HETERO_CONVERSION uint32_t's, some of the "extra" data
 *  may a user message buffer which is not automatically endian swapped.
 */
#define RTEMS_MINIMUN_HETERO_CONVERSION  MP_PACKET_MINIMUN_HETERO_CONVERSION

#ifdef __cplusplus
}
#endif

/**@}*/

#endif
/* end of include file */