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

4.104.114.84.95
Last change on this file since f44f0c7 was f44f0c7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/09/04 at 17:08:52

2004-12-09 Ralf Corsepius <ralf.corsepius@…>

  • score/include/rtems/system.h: Don't define NULL, include <stddef.h>.
  • Property mode set to 100644
File size: 4.8 KB
Line 
1/**
2 *  @file  rtems/system.h
3 *
4 *  This include file contains information that is included in every
5 *  function in the executive.  This must be the first include file
6 *  included in all internal RTEMS files.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2004.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef __RTEMS_SYSTEM_h
21#define __RTEMS_SYSTEM_h
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/*
28 * Major, minor, revision version numbers of RTEMS.
29 * Use these macros to test for features in specific releases.
30 */
31#define __RTEMS_MAJOR__ 4
32#define __RTEMS_MINOR__ 6
33#define __RTEMS_REVISION__ 99
34
35/*
36 *  The cpu options include file defines all cpu dependent
37 *  parameters for this build of RTEMS.  It must be included
38 *  first so the basic macro definitions are in place.
39 */
40
41#include <rtems/score/cpuopts.h>
42
43/*
44 *  The following ensures that all data is declared in the space
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.
48 */
49
50#ifdef SCORE_INIT
51#undef  SCORE_EXTERN
52#define SCORE_EXTERN
53#else
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
80#endif
81
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
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 RTEMS_INLINES
98# ifdef __GNUC__
99#  define RTEMS_INLINE_ROUTINE static __inline__
100# else
101#  define RTEMS_INLINE_ROUTINE static inline
102# endif
103#else
104# define RTEMS_INLINE_ROUTINE
105#endif
106
107/*
108 *  The following are used by the POSIX implementation to catch bad paths.
109 */
110
111#ifdef RTEMS_POSIX_API
112int POSIX_MP_NOT_IMPLEMENTED( void );
113int POSIX_NOT_IMPLEMENTED( void );
114int POSIX_BOTTOM_REACHED( void );
115#endif
116
117/*
118 *  Include a base set of files.
119 */
120
121/*
122 * XXX: Eventually proc_ptr needs to disappear!!!
123 */
124
125typedef void * proc_ptr;
126
127#include <stddef.h>
128
129/*
130 *  Boolean constants
131 */
132
133#if !defined( TRUE ) || (TRUE != 1)
134#undef TRUE
135#define TRUE     (1)
136#endif
137
138#if !defined( FALSE ) || (FALSE != 0)
139#undef FALSE
140#define FALSE     (0)
141#endif
142
143#include <rtems/stdint.h>
144#include <rtems/score/cpu.h>        /* processor specific information */
145
146#define stringify( _x ) # _x
147
148#define RTEMS_offsetof(type, field) \
149        ((uint32_t  ) &(((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.