source: rtems/cpukit/score/include/rtems/system.h @ 8af72be

4.104.114.84.95
Last change on this file since 8af72be was 8af72be, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/23/03 at 21:45:00

2003-11-23 Ralf Corsepius <corsepiu@…>

PR 525/rtems

  • include/rtems/system.h: Use RTEMS_INLINES instead of USE_INLINES.
  • include/rtems/score/chain.h: Ditto.
  • include/rtems/score/thread.h: Ditto.
  • src/chain.c: Ditto.
  • src/coremutexseize.c: Ditto.
  • src/threadget.c: Ditto.
  • 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.rtems.com/license/LICENSE.
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 * Major, minor, revision version numbers of RTEMS.
26 * Use these macros to test for features in specific releases.
27 */
28#define __RTEMS_MAJOR__ 4
29#define __RTEMS_MINOR__ 6
30#define __RTEMS_REVISION__ 0
31
32/*
33 *  The cpu options include file defines all cpu dependent
34 *  parameters for this build of RTEMS.  It must be included
35 *  first so the basic macro definitions are in place.
36 */
37
38#include <rtems/score/cpuopts.h>
39
40/*
41 *  The following ensures that all data is declared in the space
42 *  of the initialization routine for either the Initialization Manager
43 *  or the initialization file for the appropriate API.  It is
44 *  referenced as "external" in every other file.
45 */
46
47#ifdef SCORE_INIT
48#undef  SCORE_EXTERN
49#define SCORE_EXTERN
50#else
51#undef  SCORE_EXTERN
52#define SCORE_EXTERN  extern
53#endif
54
55#ifdef SAPI_INIT
56#undef  SAPI_EXTERN
57#define SAPI_EXTERN
58#else
59#undef  SAPI_EXTERN
60#define SAPI_EXTERN  extern
61#endif
62
63#ifdef RTEMS_API_INIT
64#undef  RTEMS_EXTERN
65#define RTEMS_EXTERN
66#else
67#undef  RTEMS_EXTERN
68#define RTEMS_EXTERN  extern
69#endif
70
71#ifdef POSIX_API_INIT
72#undef  POSIX_EXTERN
73#define POSIX_EXTERN
74#else
75#undef  POSIX_EXTERN
76#define POSIX_EXTERN  extern
77#endif
78
79#ifdef ITRON_API_INIT
80#undef  ITRON_EXTERN
81#define ITRON_EXTERN
82#else
83#undef  ITRON_EXTERN
84#define ITRON_EXTERN  extern
85#endif
86
87/*
88 *  The following (in conjunction with compiler arguments) are used
89 *  to choose between the use of static inline functions and macro
90 *  functions.   The static inline implementation allows better
91 *  type checking with no cost in code size or execution speed.
92 */
93
94#ifdef RTEMS_INLINES
95# ifdef __GNUC__
96#  define RTEMS_INLINE_ROUTINE static __inline__
97# else
98#  define RTEMS_INLINE_ROUTINE static inline
99# endif
100#else
101# define RTEMS_INLINE_ROUTINE
102#endif
103
104/*
105 *  The following are used by the POSIX implementation to catch bad paths.
106 */
107
108#ifdef RTEMS_POSIX_API
109int POSIX_MP_NOT_IMPLEMENTED( void );
110int POSIX_NOT_IMPLEMENTED( void );
111int POSIX_BOTTOM_REACHED( void );
112#endif
113
114/*
115 *  Include a base set of files.
116 */
117
118/*
119 * XXX: Eventually proc_ptr needs to disappear!!!
120 */
121
122typedef void * proc_ptr;
123
124/*
125 *  Define NULL
126 */
127
128#ifndef NULL
129#define NULL      0          /* NULL value */
130#endif
131
132/*
133 *  Boolean constants
134 */
135
136#if !defined( TRUE ) || (TRUE != 1)
137#undef TRUE
138#define TRUE     (1)
139#endif
140
141#if !defined( FALSE ) || (FALSE != 0)
142#undef FALSE
143#define FALSE     (0)
144#endif
145
146#include <rtems/score/cpu.h>        /* processor specific information */
147
148#define stringify( _x ) # _x
149
150#define RTEMS_offsetof(type, field) \
151        ((unsigned32) &(((type *) 0)->field))
152
153/*
154 *  The following is the extern for the RTEMS version string.
155 *  The contents of this string are CPU specific.
156 */
157
158extern const char _RTEMS_version[];         /* RTEMS version string */
159extern const char _Copyright_Notice[];      /* RTEMS copyright string */
160
161/*
162 *  The following defines the CPU dependent information table.
163 */
164
165SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
166
167/*
168 *  Macros to access CPU Table fields required by ALL ports.
169 *
170 *  NOTE: Similar macros to access port specific fields in in the
171 *        appropriate cpu.h file.
172 */
173
174#define rtems_cpu_configuration_get_table() \
175   (&_CPU_Table)
176
177#define rtems_cpu_configuration_get_pretasking_hook() \
178   (_CPU_Table.pretasking_hook)
179
180#define rtems_cpu_configuration_get_predriver_hook() \
181   (_CPU_Table.predriver_hook)
182
183#define rtems_cpu_configuration_get_postdriver_hook() \
184   (_CPU_Table.postdriver_hook)
185
186#define rtems_cpu_configuration_get_idle_task() \
187   (_CPU_Table.idle_task)
188
189#define rtems_cpu_configuration_get_do_zero_of_workspace() \
190   (_CPU_Table.do_zero_of_workspace)
191
192#define rtems_cpu_configuration_get_idle_task_stack_size() \
193   (_CPU_Table.idle_task_stack_size)
194
195#define rtems_cpu_configuration_get_interrupt_stack_size() \
196   (_CPU_Table.interrupt_stack_size)
197
198#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
199   (_CPU_Table.extra_mpci_receive_server_stack)
200
201#define rtems_cpu_configuration_get_stack_allocate_hook() \
202   (_CPU_Table.stack_allocate_hook)
203
204#define rtems_cpu_configuration_get_stack_free_hook() \
205   (_CPU_Table.stack_free_hook)
206
207/*
208 *  XXX weird RTEMS stuff that probably should be somewhere else.
209 */
210
211#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
212
213#ifdef __cplusplus
214}
215#endif
216
217#endif
218/* end of include file */
Note: See TracBrowser for help on using the repository browser.