source: rtems/cpukit/score/include/rtems/system.h @ a5b6cdd

4.104.114.95
Last change on this file since a5b6cdd was a5b6cdd, checked in by Joel Sherrill <joel.sherrill@…>, on 09/08/08 at 15:19:34

2008-09-08 Joel Sherrill <joel.sherrill@…>

  • libcsupport/include/rtems/libio_.h, libcsupport/src/libio_sockets.c, libfs/src/dosfs/fat.h, libfs/src/dosfs/msdos.h, libfs/src/imfs/deviceio.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/monitor.h, libmisc/stackchk/internal.h, rtems/inline/rtems/rtems/part.inl, score/include/rtems/system.h, score/include/rtems/score/bitfield.h, score/src/mpci.c, score/src/objectextendinformation.c, score/src/threadmp.c: Remove extraneous spaces.
  • Property mode set to 100644
File size: 5.3 KB
Line 
1/**
2 *  @file  rtems/system.h
3 *
4 *  This include file contains information that is included in every
5 *  function in the executive.  This must be the first include file
6 *  included in all internal RTEMS files.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2007.
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.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_SYSTEM_H
21#define _RTEMS_SYSTEM_H
22
23/**
24 *  @mainpage RTEMS SuperCore
25 *
26 *  The RTEMS real-time operating systems is a layered system
27 *  with each of the public APIs implemented in terms of a common
28 *  foundation layer called the SuperCore.  This is the Doxygen
29 *  generated documentation for the RTEMS SuperCore.
30 */
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 *  The cpu options include file defines all cpu dependent
38 *  parameters for this build of RTEMS.  It must be included
39 *  first so the basic macro definitions are in place.
40 */
41#include <rtems/score/cpuopts.h>
42
43/**
44 *  The following ensures that all data is declared in the space
45 *  of the initialization routine for either the Initialization Manager
46 *  or the initialization file for the appropriate API.  It is
47 *  referenced as "external" in every other file.
48 */
49#ifdef SCORE_INIT
50#undef  SCORE_EXTERN
51#define SCORE_EXTERN
52#else
53#undef  SCORE_EXTERN
54#define SCORE_EXTERN  extern
55#endif
56
57/**
58 *  The following ensures that all data is declared in the space
59 *  of the initialization routine for either the Initialization Manager
60 *  or the initialization file for the appropriate API.  It is
61 *  referenced as "external" in every other file.
62 */
63#ifdef SAPI_INIT
64#undef  SAPI_EXTERN
65#define SAPI_EXTERN
66#else
67#undef  SAPI_EXTERN
68#define SAPI_EXTERN  extern
69#endif
70
71/**
72 *  The following ensures that all data is declared in the space
73 *  of the initialization routine for either the Initialization Manager
74 *  or the initialization file for the appropriate API.  It is
75 *  referenced as "external" in every other file.
76 */
77#ifdef RTEMS_API_INIT
78#undef  RTEMS_EXTERN
79#define RTEMS_EXTERN
80#else
81#undef  RTEMS_EXTERN
82#define RTEMS_EXTERN  extern
83#endif
84
85/**
86 *  The following ensures that all data is declared in the space
87 *  of the initialization routine for either the Initialization Manager
88 *  or the initialization file for the appropriate API.  It is
89 *  referenced as "external" in every other file.
90 */
91#ifdef POSIX_API_INIT
92#undef  POSIX_EXTERN
93#define POSIX_EXTERN
94#else
95#undef  POSIX_EXTERN
96#define POSIX_EXTERN  extern
97#endif
98
99/**
100 *  The following ensures that all data is declared in the space
101 *  of the initialization routine for either the Initialization Manager
102 *  or the initialization file for the appropriate API.  It is
103 *  referenced as "external" in every other file.
104 */
105#ifdef ITRON_API_INIT
106#undef  ITRON_EXTERN
107#define ITRON_EXTERN
108#else
109#undef  ITRON_EXTERN
110#define ITRON_EXTERN  extern
111#endif
112
113/**
114 *  The following (in conjunction with compiler arguments) are used
115 *  to choose between the use of static inline functions and macro
116 *  functions.   The static inline implementation allows better
117 *  type checking with no cost in code size or execution speed.
118 */
119#ifdef __GNUC__
120#  define RTEMS_INLINE_ROUTINE static __inline__
121#else
122#  define RTEMS_INLINE_ROUTINE static inline
123#endif
124
125/**
126 *  The following macro is a compiler specific way to ensure that memory
127 *  writes are not reordered around certian points.  This specifically can
128 *  impact interrupt disable and thread dispatching critical sections.
129 */
130#ifdef __GNUC__
131  #define RTEMS_COMPILER_MEMORY_BARRIER() asm volatile("" ::: "memory")
132#else
133  #define RTEMS_COMPILER_MEMORY_BARRIER()
134#endif
135
136/**
137 *  The following macro is a compiler specific way to indicate that
138 *  the method will NOT return to the caller.  This can assist the
139 *  compiler in code generation and avoid unreachable paths.  This
140 *  can impact the code generated following calls to
141 *  rtems_fatal_error_occurred and _Internal_error_Occurred.
142 */
143#ifdef __GNUC__
144  #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE \
145      __attribute__ ((noreturn))
146#else
147  #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
148#endif
149
150#ifdef RTEMS_POSIX_API
151/** The following is used by the POSIX implementation to catch bad paths.  */
152int POSIX_NOT_IMPLEMENTED( void );
153#endif
154
155/*
156 *  Include a base set of files.
157 */
158
159/**
160 * XXX: Eventually proc_ptr needs to disappear!!!
161 */
162typedef void * proc_ptr;
163
164#include <stddef.h>
165
166#if !defined( TRUE ) || (TRUE != 1)
167/**  Boolean constant TRUE */
168#undef TRUE
169#define TRUE     (1)
170#endif
171
172#if !defined( FALSE ) || (FALSE != 0)
173/**  Boolean constant FALSE */
174#undef FALSE
175#define FALSE     (0)
176#endif
177
178#include <rtems/stdint.h>
179#include <rtems/score/cpu.h>        /* processor specific information */
180
181/**
182 *  This macro is used to obtain the offset of a field in a structure.
183 */
184#define RTEMS_offsetof(type, field) \
185       ((uint32_t) &(((type *) 0)->field))
186
187/**
188 *  The following is the extern for the RTEMS version string.
189 *
190 *  @note The contents of this string are CPU specific.
191 */
192extern const char _RTEMS_version[];
193
194/**
195 *  The following is the extern for the RTEMS copyright string.
196 */
197extern const char _Copyright_Notice[];
198
199/** This macro defines the maximum length of a Classic API name. */
200#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
201
202#ifdef __cplusplus
203}
204#endif
205
206#endif
207/* end of include file */
Note: See TracBrowser for help on using the repository browser.