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

4.104.114.84.95
Last change on this file since e0ba3e8 was e0ba3e8, checked in by Joel Sherrill <joel.sherrill@…>, on 07/10/00 at 19:23:38

Patch rtems-rc-20000709-1.diff from Ralf Corsepius <corsepiu@…>
that addresses aspects of the targopts.h multilib related
issues.

Changes:

  • Move targopts.h to libbsp/include, because the current targopts.h actually is a per-BSP-header and therefore can not stay below exec/.
  • Introduce an autoheader generated header file (exec/score/include/rtems/score/cpuopts.h), which shall take per-cpu configuration options only.
  • Move all autoconf-detectable/configure specified per-cpu option-defines from targopts.h to cpuopts.h.
  • Add Makefiles to the libbsp/shared directory hierarchy.

Notes:

  • The new per-bsp targopts.h in libbsp includes the per-cpu cpuopts.h. This way, the new targopts.h is kept backward compatible to the old targopts.h and existing BSPs which (carelessly) include targopts.h (i386, ppc) should be kept working when using the multilib-disabled configuration scheme.
  • cpuopts.h is not yet complete, because the per-BSP make-targopts rules from custom/<BSP>.cfg files can not be applied to files below exec/ when building multilibs.
  • All files below exec/ should not include targopts.h anymore, but should include cpuopts.h instead. However, eliminating inclusion of targopts.h currently triggers further structural / header file inclusion related issues, because several ports apply BSP or CPU_MODEL specific defines from targopts.h below exec/
  • Property mode set to 100644
File size: 4.5 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: Instead of targopts.h, cpuopts.h should be included here.
32 * #include <rtems/score/cpuopts.h>
33 */
34#include <rtems/score/targopts.h>
35
36/*
37 *  The following insures that all data is declared in the space
38 *  of the initialization routine for either the Initialization Manager
39 *  or the initialization file for the appropriate API.  It is
40 *  referenced as "external" in every other file.
41 */
42
43#ifdef SCORE_INIT
44#undef  SCORE_EXTERN
45#define SCORE_EXTERN
46#else
47#undef  SCORE_EXTERN
48#define SCORE_EXTERN  extern
49#endif
50
51#ifdef SAPI_INIT
52#undef  SAPI_EXTERN
53#define SAPI_EXTERN
54#else
55#undef  SAPI_EXTERN
56#define SAPI_EXTERN  extern
57#endif
58
59#ifdef RTEMS_API_INIT
60#undef  RTEMS_EXTERN
61#define RTEMS_EXTERN
62#else
63#undef  RTEMS_EXTERN
64#define RTEMS_EXTERN  extern
65#endif
66
67#ifdef POSIX_API_INIT
68#undef  POSIX_EXTERN
69#define POSIX_EXTERN
70#else
71#undef  POSIX_EXTERN
72#define POSIX_EXTERN  extern
73#endif
74
75#ifdef ITRON_API_INIT
76#undef  ITRON_EXTERN
77#define ITRON_EXTERN
78#else
79#undef  ITRON_EXTERN
80#define ITRON_EXTERN  extern
81#endif
82
83/*
84 *  The following (in conjunction with compiler arguments) are used
85 *  to choose between the use of static inline functions and macro
86 *  functions.   The static inline implementation allows better
87 *  type checking with no cost in code size or execution speed.
88 */
89
90#ifdef USE_INLINES
91# ifdef __GNUC__
92#  define RTEMS_INLINE_ROUTINE static __inline__
93# else
94#  define RTEMS_INLINE_ROUTINE static inline
95# endif
96#else
97# define RTEMS_INLINE_ROUTINE
98#endif
99
100/*
101 *  Include a base set of files.
102 */
103
104/*
105 * XXX: Eventually proc_ptr needs to disappear!!!
106 */
107
108typedef void * proc_ptr;
109
110/*
111 *  Define NULL
112 */
113
114#ifndef NULL
115#define NULL      0          /* NULL value */
116#endif
117
118/*
119 *  Boolean constants
120 */
121
122#if !defined( TRUE ) || (TRUE != 1)
123#undef TRUE
124#define TRUE     (1)
125#endif
126
127#if !defined( FALSE ) || (FALSE != 0)
128#undef FALSE
129#define FALSE     (0)
130#endif
131
132#include <rtems/score/cpu.h>        /* processor specific information */
133
134#define stringify( _x ) # _x
135
136#define RTEMS_offsetof(type, field) \
137        ((unsigned32) &(((type *) 0)->field))
138
139/*
140 *  The following is the extern for the RTEMS version string.
141 *  The contents of this string are CPU specific.
142 */
143
144extern const char _RTEMS_version[];         /* RTEMS version string */
145extern const char _Copyright_Notice[];      /* RTEMS copyright string */
146
147/*
148 *  The following defines the CPU dependent information table.
149 */
150
151SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
152
153/*
154 *  Macros to access CPU Table fields required by ALL ports.
155 *
156 *  NOTE: Similar macros to access port specific fields in in the
157 *        appropriate cpu.h file.
158 */
159
160#define rtems_cpu_configuration_get_table() \
161   (&_CPU_Table)
162
163#define rtems_cpu_configuration_get_pretasking_hook() \
164   (_CPU_Table.pretasking_hook)
165
166#define rtems_cpu_configuration_get_predriver_hook() \
167   (_CPU_Table.predriver_hook)
168
169#define rtems_cpu_configuration_get_postdriver_hook() \
170   (_CPU_Table.postdriver_hook)
171
172#define rtems_cpu_configuration_get_idle_task() \
173   (_CPU_Table.idle_task)
174
175#define rtems_cpu_configuration_get_do_zero_of_workspace() \
176   (_CPU_Table.do_zero_of_workspace)
177
178#define rtems_cpu_configuration_get_idle_task_stack_size() \
179   (_CPU_Table.idle_task_stack_size)
180
181#define rtems_cpu_configuration_get_interrupt_stack_size() \
182   (_CPU_Table.interrupt_stack_size)
183
184#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
185   (_CPU_Table.extra_mpci_receive_server_stack)
186
187#define rtems_cpu_configuration_get_stack_allocate_hook() \
188   (_CPU_Table.stack_allocate_hook)
189
190#define rtems_cpu_configuration_get_stack_free_hook() \
191   (_CPU_Table.stack_free_hook)
192
193/*
194 *  XXX weird RTEMS stuff that probably should be somewhere else.
195 */
196
197#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
198
199#ifdef __cplusplus
200}
201#endif
202
203#endif
204/* end of include file */
Note: See TracBrowser for help on using the repository browser.