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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [system.h] - Blame information for rev 735

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

Line No. Rev Author Line
1 30 unneback
/*  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: system.h,v 1.2 2001-09-27 11:59:32 chris 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 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
#include <rtems/score/targopts.h>
31
 
32
/*
33
 *  The following insures 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
 *  Include a base set of files.
98
 */
99
 
100
/*
101
 * XXX: Eventually proc_ptr needs to disappear!!!
102
 */
103
 
104
typedef 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
 
128
#include <rtems/score/cpu.h>        /* processor specific information */
129
 
130
#define stringify( _x ) # _x
131
 
132
#define RTEMS_offsetof(type, field) \
133
        ((unsigned32) &(((type *) 0)->field))
134
 
135
/*
136
 *  The following is the extern for the RTEMS version string.
137
 *  The contents of this string are CPU specific.
138
 */
139
 
140
extern const char _RTEMS_version[];         /* RTEMS version string */
141
extern const char _Copyright_Notice[];      /* RTEMS copyright string */
142
 
143
/*
144
 *  The following defines the CPU dependent information table.
145
 */
146
 
147
SCORE_EXTERN rtems_cpu_table _CPU_Table;               /* CPU dependent info */
148
 
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
 
189
/*
190
 *  XXX weird RTEMS stuff that probably should be somewhere else.
191
 */
192
 
193
#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
194
 
195
#ifdef __cplusplus
196
}
197
#endif
198
 
199
#endif
200
/* end of include file */

powered by: WebSVN 2.1.0

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