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

4.104.114.84.95
Last change on this file since 3a96054 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

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