source: rtems/cpukit/rtems/include/rtems.h @ 2f96c1eb

4.115
Last change on this file since 2f96c1eb was 2f96c1eb, checked in by Joel Sherrill <joel.sherrill@…>, on 06/28/11 at 20:39:39

2011-06-28 Joel Sherrill <joel.sherrill@…>

PR 1826/cpukit

  • libmisc/cpuuse/cpuusagereport.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h: Add SMP Helper methods to Classic API.
  • rtems/include/rtems/rtems/smp.h: New file.
  • Property mode set to 100644
File size: 6.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicRTEMS
5 *
6 * @brief Provides the public interface to the RTEMS 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_H
20#define _RTEMS_H
21
22/**
23 * @defgroup ClassicRTEMS RTEMS Classic API
24 *
25 * RTEMS Classic API definitions and modules.
26 *
27 * @{
28 */
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#if (!defined(__RTEMS_VIOLATE_KERNEL_VISIBILITY__)) && \
35    (!defined(__RTEMS_INSIDE__))
36/**
37 * @brief Compiling RTEMS application macro.
38 *
39 * Unless told otherwise, the RTEMS include files will hide some stuff from
40 * normal application code.  Defining this crosses a boundary which is
41 * undesirable since it means your application is using RTEMS features which
42 * are not included in the formally defined and supported API.  Define this at
43 * your own risk.
44 */
45#define __RTEMS_APPLICATION__
46#endif
47
48#include <rtems/system.h>
49#include <rtems/rtems/status.h>
50#include <rtems/rtems/types.h>
51
52#include <rtems/config.h>
53#include <rtems/init.h>
54#include <rtems/rtems/options.h>
55#include <rtems/rtems/tasks.h>
56#include <rtems/rtems/intr.h>
57#include <rtems/rtems/barrier.h>
58#include <rtems/rtems/cache.h>
59#include <rtems/rtems/clock.h>
60#include <rtems/extension.h>
61#include <rtems/rtems/timer.h>
62#include <rtems/rtems/sem.h>
63#include <rtems/rtems/message.h>
64#include <rtems/rtems/event.h>
65#include <rtems/rtems/signal.h>
66#include <rtems/rtems/event.h>
67#include <rtems/rtems/object.h>
68#include <rtems/rtems/part.h>
69#include <rtems/rtems/region.h>
70#include <rtems/rtems/dpmem.h>
71#include <rtems/io.h>
72#include <rtems/fatal.h>
73#include <rtems/rtems/ratemon.h>
74#if defined(RTEMS_MULTIPROCESSING)
75#include <rtems/rtems/mp.h>
76#endif
77#if defined(RTEMS_SMP)
78#include <rtems/rtems/smp.h>
79#endif
80
81
82#include <rtems/rtems/support.h>
83#include <rtems/score/sysstate.h>
84
85/**
86 * @brief Returns the pointer to the RTEMS version string.
87 */
88const char *rtems_get_version_string(void);
89
90/**
91 * @brief Indicates whether this processor variant has hardware floating point
92 * support.
93 */
94#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
95
96/**********************************************************************
97 *      CONSTANTS WHICH MAY BE USED IN OBJECT NAME TO ID SEARCHES
98 **********************************************************************/
99
100/**
101 * @brief Indicates that a search is across all nodes.
102 */
103#define RTEMS_SEARCH_ALL_NODES   OBJECTS_SEARCH_ALL_NODES
104
105/**
106 * @brief Indicates that a search is across all nodes except the one the call
107 * is made from.
108 */
109#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
110
111/**
112 * @brief Indicates that the search is to be restricted to the local node.
113 */
114#define RTEMS_SEARCH_LOCAL_NODE  OBJECTS_SEARCH_LOCAL_NODE
115
116/**
117 * @brief Indicates that the caller wants to obtain the name of the currently
118 * executing thread.
119 *
120 * This constant is only meaningful when obtaining the name of a task.
121 */
122#define RTEMS_WHO_AM_I           OBJECTS_WHO_AM_I
123
124/**********************************************************************
125 *        Parameters and return Id's for _Objects_Get_next
126 **********************************************************************/
127
128/**
129 * @brief Lowest valid index value for the index portion of an object
130 * identifier.
131 */
132#define RTEMS_OBJECT_ID_INITIAL_INDEX        OBJECTS_ID_INITIAL_INDEX
133
134/**
135 * @brief Maximum valid index value for the index portion of an object
136 * identifier.
137 */
138#define RTEMS_OBJECT_ID_FINAL_INDEX          OBJECTS_ID_FINAL_INDEX
139
140/**
141 * @brief Returns the identifier of the object with the lowest valid index
142 * value.
143 *
144 * The object is specified by the API @a _api, the object class @a _class and
145 * the node @a _node where the object resides.
146 */
147#define RTEMS_OBJECT_ID_INITIAL(_api, _class, _node) \
148   OBJECTS_ID_INITIAL(_api, _class, _node)
149
150/**
151 * @brief Maximum valid object identifier.
152 */
153#define RTEMS_OBJECT_ID_FINAL                OBJECTS_ID_FINAL
154
155/**
156 * @brief Minimum stack size which every thread must exceed.
157 *
158 * It is the minimum stack size recommended for use on this processor. This
159 * value is selected by the RTEMS developers conservatively to minimize the
160 * risk of blown stacks for most user applications. Using this constant when
161 * specifying the task stack size, indicates that the stack size will be at
162 * least RTEMS_MINIMUM_STACK_SIZE bytes in size. If the user configured minimum
163 * stack size is larger than the recommended minimum, then it will be used.
164 */
165#define RTEMS_MINIMUM_STACK_SIZE  STACK_MINIMUM_SIZE
166
167/**
168 * @brief Specifies that the task should be created with the configured minimum
169 * stack size.
170 *
171 * Using this constant when specifying the task stack size indicates that this
172 * task is to be created with a stack size of the minimum stack size that was
173 * configured by the application. If not explicitly configured by the
174 * application, the default configured minimum stack size is the processor
175 * dependent value RTEMS_MINIMUM_STACK_SIZE. Since this uses the configured
176 * minimum stack size value, you may get a stack size that is smaller or larger
177 * than the recommended minimum. This can be used to provide large stacks for
178 * all tasks on complex applications or small stacks on applications that are
179 * trying to conserve memory.
180 */
181#define RTEMS_CONFIGURED_MINIMUM_STACK_SIZE  0
182
183/**
184 * @brief Constant for indefinite wait.
185 *
186 * This is actually an illegal interval value.
187 */
188#define RTEMS_NO_TIMEOUT  WATCHDOG_NO_TIMEOUT
189
190/**
191 * @brief An MPCI must support packets of at least this size.
192 */
193#define RTEMS_MINIMUM_PACKET_SIZE  MP_PACKET_MINIMUM_PACKET_SIZE
194
195/**
196 * @brief Defines the count of @c uint32_t numbers in a packet which must be
197 * converted to native format in a heterogeneous system.
198 *
199 * In packets longer than this value, some of the extra data may be a user
200 * message buffer which is not automatically endian swapped.
201 */
202#define RTEMS_MINIMUN_HETERO_CONVERSION  MP_PACKET_MINIMUN_HETERO_CONVERSION
203
204#ifdef __cplusplus
205}
206#endif
207
208/**@}*/
209
210#endif
211/* end of include file */
Note: See TracBrowser for help on using the repository browser.