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

4.104.114.84.95
Last change on this file since a8d650c was a8d650c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/25/00 at 18:59:36

2000-09-25 Joel Sherrill <joel@…>

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