OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [include/] [rtems/] [system.h] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  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
 *  system.h,v 1.32 2002/04/18 13:07:50 joel Exp
15
 */
16
 
17
#ifndef __RTEMS_SYSTEM_h
18
#define __RTEMS_SYSTEM_h
19
 
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
 
24
/*
25
 *  The cpu options include file defines all cpu 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
#include <rtems/score/cpuopts.h>
31
 
32
/*
33
 *  The following ensures that all data is declared in the space
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.
37
 */
38
 
39
#ifdef SCORE_INIT
40
#undef  SCORE_EXTERN
41
#define SCORE_EXTERN
42
#else
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
69
#endif
70
 
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
 
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
87
# ifdef __GNUC__
88
#  define RTEMS_INLINE_ROUTINE static __inline__
89
# else
90
#  define RTEMS_INLINE_ROUTINE static inline
91
# endif
92
#else
93
# define RTEMS_INLINE_ROUTINE
94
#endif
95
 
96
/*
97
 *  The following are used by the POSIX implementation to catch bad paths.
98
 */
99
 
100
#ifdef RTEMS_POSIX_API
101
int POSIX_MP_NOT_IMPLEMENTED( void );
102
int POSIX_NOT_IMPLEMENTED( void );
103
int POSIX_BOTTOM_REACHED( void );
104
#endif
105
 
106
/*
107
 *  Include a base set of files.
108
 */
109
 
110
/*
111
 * XXX: Eventually proc_ptr needs to disappear!!!
112
 */
113
 
114
typedef void * proc_ptr;
115
 
116
/*
117
 *  Define NULL
118
 */
119
 
120
#ifndef NULL
121
#define NULL      0          /* NULL value */
122
#endif
123
 
124
/*
125
 *  Boolean constants
126
 */
127
 
128
#if !defined( TRUE ) || (TRUE != 1)
129
#undef TRUE
130
#define TRUE     (1)
131
#endif
132
 
133
#if !defined( FALSE ) || (FALSE != 0)
134
#undef FALSE
135
#define FALSE     (0)
136
#endif
137
 
138
#include <rtems/score/cpu.h>        /* processor specific information */
139
 
140
#define stringify( _x ) # _x
141
 
142
#define RTEMS_offsetof(type, field) \
143
        ((unsigned32) &(((type *) 0)->field))
144
 
145
/*
146
 *  The following is the extern for the RTEMS version string.
147
 *  The contents of this string are CPU specific.
148
 */
149
 
150
extern const char _RTEMS_version[];         /* RTEMS version string */
151
extern const char _Copyright_Notice[];      /* RTEMS copyright string */
152
 
153
/*
154
 *  The following defines the CPU dependent information table.
155
 */
156
 
157
SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
158
 
159
/*
160
 *  Macros to access CPU Table fields required by ALL ports.
161
 *
162
 *  NOTE: Similar macros to access port specific fields in in the
163
 *        appropriate cpu.h file.
164
 */
165
 
166
#define rtems_cpu_configuration_get_table() \
167
   (&_CPU_Table)
168
 
169
#define rtems_cpu_configuration_get_pretasking_hook() \
170
   (_CPU_Table.pretasking_hook)
171
 
172
#define rtems_cpu_configuration_get_predriver_hook() \
173
   (_CPU_Table.predriver_hook)
174
 
175
#define rtems_cpu_configuration_get_postdriver_hook() \
176
   (_CPU_Table.postdriver_hook)
177
 
178
#define rtems_cpu_configuration_get_idle_task() \
179
   (_CPU_Table.idle_task)
180
 
181
#define rtems_cpu_configuration_get_do_zero_of_workspace() \
182
   (_CPU_Table.do_zero_of_workspace)
183
 
184
#define rtems_cpu_configuration_get_idle_task_stack_size() \
185
   (_CPU_Table.idle_task_stack_size)
186
 
187
#define rtems_cpu_configuration_get_interrupt_stack_size() \
188
   (_CPU_Table.interrupt_stack_size)
189
 
190
#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
191
   (_CPU_Table.extra_mpci_receive_server_stack)
192
 
193
#define rtems_cpu_configuration_get_stack_allocate_hook() \
194
   (_CPU_Table.stack_allocate_hook)
195
 
196
#define rtems_cpu_configuration_get_stack_free_hook() \
197
   (_CPU_Table.stack_free_hook)
198
 
199
/*
200
 *  XXX weird RTEMS stuff that probably should be somewhere else.
201
 */
202
 
203
#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
204
 
205
#ifdef __cplusplus
206
}
207
#endif
208
 
209
#endif
210
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.