source: rtems/c/src/exec/score/include/rtems/system.h @ 8ca1e808

4.104.114.84.95
Last change on this file since 8ca1e808 was 8ca1e808, checked in by Joel Sherrill <joel.sherrill@…>, on 08/25/00 at 17:30:46

2000-08-17 Ralf Corsepius <corsepiu@…>

  • include/rtems/system.h: Include cpuopts.h for i386.
  • Property mode set to 100644
File size: 4.7 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-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_SYSTEM_h
18#define __RTEMS_SYSTEM_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/*
25 *  The target options include file defines all target dependent
26 *  parameters for this build of RTEMS.  It must be included
27 *  first so the basic macro definitions are in place.
28 */
29
30/*
31 * FIXME: cpuopts.h should be included here.
32 */
33#if defined(__h8300__) \
34  || defined(__i960__) \
35  || defined(__mc68000__) \
36  || defined(__sh__) \
37  || defined(__sparc__) \
38  || defined(__i386__)
39  /* these cpus are ready to apply cpuopts.h */
40#include <rtems/score/cpuopts.h>
41#else
42  /* fallback to targopts.h for hppa1.1, mips, and powerpc */
43#include <rtems/score/targopts.h>
44#endif
45
46/*
47 *  The following insures that all data is declared in the space
48 *  of the initialization routine for either the Initialization Manager
49 *  or the initialization file for the appropriate API.  It is
50 *  referenced as "external" in every other file.
51 */
52
53#ifdef SCORE_INIT
54#undef  SCORE_EXTERN
55#define SCORE_EXTERN
56#else
57#undef  SCORE_EXTERN
58#define SCORE_EXTERN  extern
59#endif
60
61#ifdef SAPI_INIT
62#undef  SAPI_EXTERN
63#define SAPI_EXTERN
64#else
65#undef  SAPI_EXTERN
66#define SAPI_EXTERN  extern
67#endif
68
69#ifdef RTEMS_API_INIT
70#undef  RTEMS_EXTERN
71#define RTEMS_EXTERN
72#else
73#undef  RTEMS_EXTERN
74#define RTEMS_EXTERN  extern
75#endif
76
77#ifdef POSIX_API_INIT
78#undef  POSIX_EXTERN
79#define POSIX_EXTERN
80#else
81#undef  POSIX_EXTERN
82#define POSIX_EXTERN  extern
83#endif
84
85#ifdef ITRON_API_INIT
86#undef  ITRON_EXTERN
87#define ITRON_EXTERN
88#else
89#undef  ITRON_EXTERN
90#define ITRON_EXTERN  extern
91#endif
92
93/*
94 *  The following (in conjunction with compiler arguments) are used
95 *  to choose between the use of static inline functions and macro
96 *  functions.   The static inline implementation allows better
97 *  type checking with no cost in code size or execution speed.
98 */
99
100#ifdef USE_INLINES
101# ifdef __GNUC__
102#  define RTEMS_INLINE_ROUTINE static __inline__
103# else
104#  define RTEMS_INLINE_ROUTINE static inline
105# endif
106#else
107# define RTEMS_INLINE_ROUTINE
108#endif
109
110/*
111 *  Include a base set of files.
112 */
113
114/*
115 * XXX: Eventually proc_ptr needs to disappear!!!
116 */
117
118typedef void * proc_ptr;
119
120/*
121 *  Define NULL
122 */
123
124#ifndef NULL
125#define NULL      0          /* NULL value */
126#endif
127
128/*
129 *  Boolean constants
130 */
131
132#if !defined( TRUE ) || (TRUE != 1)
133#undef TRUE
134#define TRUE     (1)
135#endif
136
137#if !defined( FALSE ) || (FALSE != 0)
138#undef FALSE
139#define FALSE     (0)
140#endif
141
142#include <rtems/score/cpu.h>        /* processor specific information */
143
144#define stringify( _x ) # _x
145
146#define RTEMS_offsetof(type, field) \
147        ((unsigned32) &(((type *) 0)->field))
148
149/*
150 *  The following is the extern for the RTEMS version string.
151 *  The contents of this string are CPU specific.
152 */
153
154extern const char _RTEMS_version[];         /* RTEMS version string */
155extern const char _Copyright_Notice[];      /* RTEMS copyright string */
156
157/*
158 *  The following defines the CPU dependent information table.
159 */
160
161SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
162
163/*
164 *  Macros to access CPU Table fields required by ALL ports.
165 *
166 *  NOTE: Similar macros to access port specific fields in in the
167 *        appropriate cpu.h file.
168 */
169
170#define rtems_cpu_configuration_get_table() \
171   (&_CPU_Table)
172
173#define rtems_cpu_configuration_get_pretasking_hook() \
174   (_CPU_Table.pretasking_hook)
175
176#define rtems_cpu_configuration_get_predriver_hook() \
177   (_CPU_Table.predriver_hook)
178
179#define rtems_cpu_configuration_get_postdriver_hook() \
180   (_CPU_Table.postdriver_hook)
181
182#define rtems_cpu_configuration_get_idle_task() \
183   (_CPU_Table.idle_task)
184
185#define rtems_cpu_configuration_get_do_zero_of_workspace() \
186   (_CPU_Table.do_zero_of_workspace)
187
188#define rtems_cpu_configuration_get_idle_task_stack_size() \
189   (_CPU_Table.idle_task_stack_size)
190
191#define rtems_cpu_configuration_get_interrupt_stack_size() \
192   (_CPU_Table.interrupt_stack_size)
193
194#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
195   (_CPU_Table.extra_mpci_receive_server_stack)
196
197#define rtems_cpu_configuration_get_stack_allocate_hook() \
198   (_CPU_Table.stack_allocate_hook)
199
200#define rtems_cpu_configuration_get_stack_free_hook() \
201   (_CPU_Table.stack_free_hook)
202
203/*
204 *  XXX weird RTEMS stuff that probably should be somewhere else.
205 */
206
207#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
208
209#ifdef __cplusplus
210}
211#endif
212
213#endif
214/* end of include file */
Note: See TracBrowser for help on using the repository browser.