source: rtems/cpukit/score/include/rtems/system.h @ 5fc0dc1

4.104.114.84.95
Last change on this file since 5fc0dc1 was c627b2a3, checked in by Joel Sherrill <joel.sherrill@…>, on 05/28/96 at 21:40:52

split the inclusion of "EXTERN" data based on whether it was sapi,
score, rtems api, or posix api related.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*  system.h
2 *
3 *  This include file contains information that is included in every
4 *  function in the executive.  This must be the first include file
5 *  included in all internal RTEMS files.
6 *
7 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17
18#ifndef __RTEMS_SYSTEM_h
19#define __RTEMS_SYSTEM_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*
26 *  The following define the CPU Family and Model within the family
27 *
28 *  NOTE: The string "REPLACE_THIS_WITH_USE_INLINE_OR_MACROS" is replaced
29 *        with either "USE_INLINES" or "USE_MACROS" based upon the
30 *        whether this target configuration uses the inline or
31 *        macro implementations of the inlined RTEMS routines.
32 */
33 
34
35#define REPLACE_THIS_WITH_USE_INLINE_OR_MACROS
36
37/*
38 *  The following insures that all data is declared in the space
39 *  of the initialization routine for either the Initialization Manager
40 *  or the initialization file for the appropriate API.  It is
41 *  referenced as "external" in every other file.
42 */
43
44#ifdef SCORE_INIT
45#undef  SCORE_EXTERN
46#define SCORE_EXTERN
47#else
48#undef  SCORE_EXTERN
49#define SCORE_EXTERN  extern
50#endif
51
52#ifdef SAPI_INIT
53#undef  SAPI_EXTERN
54#define SAPI_EXTERN
55#else
56#undef  SAPI_EXTERN
57#define SAPI_EXTERN  extern
58#endif
59
60#ifdef RTEMS_API_INIT
61#undef  RTEMS_EXTERN
62#define RTEMS_EXTERN
63#else
64#undef  RTEMS_EXTERN
65#define RTEMS_EXTERN  extern
66#endif
67
68#ifdef POSIX_API_INIT
69#undef  POSIX_EXTERN
70#define POSIX_EXTERN
71#else
72#undef  POSIX_EXTERN
73#define POSIX_EXTERN  extern
74#endif
75
76/*
77 *  The following (in conjunction with compiler arguments) are used
78 *  to choose between the use of static inline functions and macro
79 *  functions.   The static inline implementation allows better
80 *  type checking with no cost in code size or execution speed.
81 */
82
83#ifdef USE_INLINES
84# define STATIC static
85# ifdef __GNUC__
86#  define INLINE __inline__
87# else
88#  define INLINE inline
89# endif
90#else
91# define STATIC
92# define INLINE
93#endif
94
95/*
96 *  Include a base set of files.
97 */
98
99/*
100 * XXX: Eventually proc_ptr needs to disappear!!!
101 */
102
103typedef void * proc_ptr;
104
105#include <rtems/score/cpu.h>        /* processor specific information */
106
107/*
108 *  Define NULL
109 */
110
111#ifndef NULL
112#define NULL      0          /* NULL value */
113#endif
114
115/*
116 *  Boolean constants
117 */
118
119#if !defined( TRUE ) || (TRUE != 1)
120#undef TRUE
121#define TRUE     (1)
122#endif
123
124#if !defined( FALSE ) || (FALSE != 0)
125#undef FALSE
126#define FALSE     (0)
127#endif
128
129#define stringify( _x ) # _x
130
131#define RTEMS_offsetof(type, field) \
132        ((unsigned32) &(((type *) 0)->field))
133
134/*
135 *  The following is the extern for the RTEMS version string.
136 *  The contents of this string are CPU specific.
137 */
138
139extern const char _RTEMS_version[];         /* RTEMS version string */
140extern const char _Copyright_Notice[];      /* RTEMS copyright string */
141
142/*
143 *  The following defines the CPU dependent information table.
144 */
145
146SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
147
148/*
149 *  XXX weird RTEMS stuff
150 */
151
152#define RTEMS_MAXIMUM_NAME_LENGTH 4
153
154#ifdef __cplusplus
155}
156#endif
157
158#endif
159/* end of include file */
Note: See TracBrowser for help on using the repository browser.