source: rtems/cpukit/score/include/rtems/system.h @ 270e3cc

4.104.114.84.95
Last change on this file since 270e3cc was 270e3cc, checked in by Joel Sherrill <joel.sherrill@…>, on 07/11/00 at 14:56:04

Patch rtems-rc-20000711-1-cvs.diff from Ralf Corsepius <corsepiu@…>
that decouples exec/ for the sh, m68k and i960 from targopts.h.

NOTE: The change to system.h is a hack to enable cpuopts.h
for some targets, but keep using targopts.h for others - I know it
does *not* work for sparc, mips, i386 and ppc. This will have
to be addressed as work continues on multilibing.

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