source: rtems/cpukit/score/include/rtems/system.h @ 9ee8036

4.104.114.84.95
Last change on this file since 9ee8036 was 61129cc5, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 18, 2002 at 10:33:49 PM

2001-01-18 Joel Sherrill <joel@…>

  • include/rtems/system.h: Only include cpuopts.h when building a multilib configuration. Some ports still need targopts.h but this small modification lets those ports work non-multilib while fixing being fixed for multilib.
  • Property mode set to 100644
File size: 5.0 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#include <rtems/score/cpuopts.h>
31
32/*
33 * FIXME: No port should have to include targopts.h
34 *
35 *  Most cpus are ready to apply only cpuopts.h but these ports
36 *  unfortunately still need targopts.h.  This means these ports
37 *  are not ready to be built multilib yet.
38 */
39
40#if !defined(RTEMS_MULTILIB)
41#if defined(__PPC__) || defined(__sparc__) || defined(__i386__)
42#include <rtems/score/targopts.h>
43#endif
44#endif
45
46/*
47 *  The following ensures 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 *  The following are used by the POSIX implementation to catch bad paths.
112 */
113
114#ifdef RTEMS_POSIX_API
115int POSIX_MP_NOT_IMPLEMENTED( void );
116int POSIX_NOT_IMPLEMENTED( void );
117int POSIX_BOTTOM_REACHED( void );
118#endif
119
120/*
121 *  Include a base set of files.
122 */
123
124/*
125 * XXX: Eventually proc_ptr needs to disappear!!!
126 */
127
128typedef void * proc_ptr;
129
130/*
131 *  Define NULL
132 */
133
134#ifndef NULL
135#define NULL      0          /* NULL value */
136#endif
137
138/*
139 *  Boolean constants
140 */
141
142#if !defined( TRUE ) || (TRUE != 1)
143#undef TRUE
144#define TRUE     (1)
145#endif
146
147#if !defined( FALSE ) || (FALSE != 0)
148#undef FALSE
149#define FALSE     (0)
150#endif
151
152#include <rtems/score/cpu.h>        /* processor specific information */
153
154#define stringify( _x ) # _x
155
156#define RTEMS_offsetof(type, field) \
157        ((unsigned32) &(((type *) 0)->field))
158
159/*
160 *  The following is the extern for the RTEMS version string.
161 *  The contents of this string are CPU specific.
162 */
163
164extern const char _RTEMS_version[];         /* RTEMS version string */
165extern const char _Copyright_Notice[];      /* RTEMS copyright string */
166
167/*
168 *  The following defines the CPU dependent information table.
169 */
170
171SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
172
173/*
174 *  Macros to access CPU Table fields required by ALL ports.
175 *
176 *  NOTE: Similar macros to access port specific fields in in the
177 *        appropriate cpu.h file.
178 */
179
180#define rtems_cpu_configuration_get_table() \
181   (&_CPU_Table)
182
183#define rtems_cpu_configuration_get_pretasking_hook() \
184   (_CPU_Table.pretasking_hook)
185
186#define rtems_cpu_configuration_get_predriver_hook() \
187   (_CPU_Table.predriver_hook)
188
189#define rtems_cpu_configuration_get_postdriver_hook() \
190   (_CPU_Table.postdriver_hook)
191
192#define rtems_cpu_configuration_get_idle_task() \
193   (_CPU_Table.idle_task)
194
195#define rtems_cpu_configuration_get_do_zero_of_workspace() \
196   (_CPU_Table.do_zero_of_workspace)
197
198#define rtems_cpu_configuration_get_idle_task_stack_size() \
199   (_CPU_Table.idle_task_stack_size)
200
201#define rtems_cpu_configuration_get_interrupt_stack_size() \
202   (_CPU_Table.interrupt_stack_size)
203
204#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
205   (_CPU_Table.extra_mpci_receive_server_stack)
206
207#define rtems_cpu_configuration_get_stack_allocate_hook() \
208   (_CPU_Table.stack_allocate_hook)
209
210#define rtems_cpu_configuration_get_stack_free_hook() \
211   (_CPU_Table.stack_free_hook)
212
213/*
214 *  XXX weird RTEMS stuff that probably should be somewhere else.
215 */
216
217#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
218
219#ifdef __cplusplus
220}
221#endif
222
223#endif
224/* end of include file */
Note: See TracBrowser for help on using the repository browser.