source: rtems/c/src/exec/sapi/headers/config.h @ b06e68ef

4.104.114.84.95
Last change on this file since b06e68ef was b06e68ef, checked in by Joel Sherrill <joel.sherrill@…>, on 08/17/95 at 19:51:51

Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@…) including the following major additions:

+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables

  • Property mode set to 100644
File size: 9.8 KB
Line 
1/*  config.h
2 *
3 *  This include file contains the table of user defined configuration
4 *  parameters.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_CONFIGURATION_h
18#define __RTEMS_CONFIGURATION_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/object.h>
25#include <rtems/thread.h>
26
27/*
28 *  The following records define the Initialization Tasks Table.
29 *  Each entry contains the information required by RTEMS to
30 *  create and start a user task automatically at executive
31 *  initialization time.
32 */
33
34typedef struct {
35  Objects_Name          name;              /* task name */
36  unsigned32            stack_size;        /* task stack size */
37  rtems_task_priority   initial_priority;  /* task priority */
38  rtems_attribute       attribute_set;     /* task attributes */
39  rtems_task_entry      entry_point;       /* task entry point */
40  rtems_mode            mode_set;          /* task initial mode */
41  unsigned32            argument;          /* task argument */
42} rtems_initialization_tasks_table;
43
44/*
45 *
46 *  The following defines the types for:
47 *
48 *    + major and minor numbers
49 *    + the return type of a device driver entry
50 *    + a pointer to a device driver entry
51 *    + an entry in the the Device Driver Address Table.  Each entry in this
52 *      table corresponds to an application provided device driver and
53 *      defines the entry points for that device driver.
54 */
55
56typedef unsigned32 rtems_device_major_number;
57typedef unsigned32 rtems_device_minor_number;
58
59typedef rtems_status_code rtems_device_driver;
60
61typedef rtems_device_driver ( *rtems_device_driver_entry )(
62                 rtems_device_major_number,
63                 rtems_device_minor_number,
64                 void *
65             );
66
67typedef struct {
68  rtems_device_driver_entry initialization; /* initialization procedure */
69  rtems_device_driver_entry open;           /* open request procedure */
70  rtems_device_driver_entry close;          /* close request procedure */
71  rtems_device_driver_entry read;           /* read request procedure */
72  rtems_device_driver_entry write;          /* write request procedure */
73  rtems_device_driver_entry control;        /* special functions procedure */
74}   rtems_driver_address_table;
75
76/*
77 *  The following records defines the User Extension Table.
78 *  This table defines the application dependent routines which
79 *  are invoked at critical points in the life of each task and
80 *  the system as a whole.
81 */
82
83typedef void rtems_extension;
84
85typedef rtems_extension ( *rtems_task_create_extension )(
86                 rtems_tcb *,
87                 rtems_tcb *
88             );
89
90typedef rtems_extension ( *rtems_task_delete_extension )(
91                 rtems_tcb *,
92                 rtems_tcb *
93             );
94
95typedef rtems_extension ( *rtems_task_start_extension )(
96                 rtems_tcb *,
97                 rtems_tcb *
98             );
99
100typedef rtems_extension ( *rtems_task_restart_extension )(
101                 rtems_tcb *,
102                 rtems_tcb *
103             );
104
105typedef rtems_extension ( *rtems_task_switch_extension )(
106                 rtems_tcb *,
107                 rtems_tcb *
108             );
109
110typedef rtems_extension ( *rtems_task_begin_extension )(
111                 rtems_tcb *
112             );
113
114typedef rtems_extension ( *rtems_task_exitted_extension )(
115                 rtems_tcb *
116             );
117
118typedef rtems_extension ( *rtems_fatal_extension )(
119                 unsigned32
120             );
121
122typedef struct {
123  rtems_task_create_extension  rtems_task_create;
124  rtems_task_start_extension   rtems_task_start;
125  rtems_task_restart_extension rtems_task_restart;
126  rtems_task_delete_extension  rtems_task_delete;
127  rtems_task_switch_extension  task_switch;
128  rtems_task_begin_extension   task_begin;
129  rtems_task_exitted_extension task_exitted;
130  rtems_fatal_extension        fatal;
131}   rtems_extensions_table;
132
133/*
134 *  The following records define the Multiprocessor Communications
135 *  Interface (MPCI) Table.  This table defines the user-provided
136 *  MPCI which is a required part of a multiprocessor RTEMS system.
137 *
138 *  For non-blocking local operations that become remote operations,
139 *  we need a timeout.  This is a per-driver timeout: default_timeout
140 */
141
142/* XXX FORWARD REFERENCES */
143
144typedef struct Configuration_Table    rtems_configuration_table;
145typedef struct Configuration_Table_MP rtems_multiprocessing_table;
146
147typedef void rtems_mpci_entry;
148
149typedef rtems_mpci_entry ( *rtems_mpci_initialization_entry )(
150                 rtems_configuration_table *,
151                 rtems_cpu_table *,
152                 rtems_multiprocessing_table *
153             );
154
155typedef rtems_mpci_entry ( *rtems_mpci_get_packet_entry )(
156                 rtems_packet_prefix **
157             );
158
159typedef rtems_mpci_entry ( *rtems_mpci_return_packet_entry )(
160                 rtems_packet_prefix *
161             );
162
163typedef rtems_mpci_entry ( *rtems_mpci_send_entry )(
164                 unsigned32,
165                 rtems_packet_prefix *
166             );
167
168typedef rtems_mpci_entry ( *rtems_mpci_receive_entry )(
169                 rtems_packet_prefix **
170             );
171
172typedef struct {
173  unsigned32                      default_timeout;        /* in ticks */
174  unsigned32                      maximum_packet_size;
175  rtems_mpci_initialization_entry initialization;
176  rtems_mpci_get_packet_entry     get_packet;
177  rtems_mpci_return_packet_entry  return_packet;
178  rtems_mpci_send_entry           send_packet;
179  rtems_mpci_receive_entry        receive_packet;
180} rtems_mpci_table;
181
182/*
183 *  The following records define the Multiprocessor Configuration
184 *  Table.  This table defines the multiprocessor system
185 *  characteristics which must be known by RTEMS in a multiprocessor
186 *  system.
187 */
188
189struct Configuration_Table_MP {
190  unsigned32  node;                   /* local node number */
191  unsigned32  maximum_nodes;          /* maximum # nodes in system */
192  unsigned32  maximum_global_objects; /* maximum # global objects */
193  unsigned32  maximum_proxies;        /* maximum # proxies */
194  rtems_mpci_table *User_mpci_table;  /* pointer to MPCI table */
195};
196
197/*
198 *  The following records define the Configuration Table.  The
199 *  information contained in this table is required in all
200 *  RTEMS systems, whether single or multiprocessor.  This
201 *  table primarily defines the following:
202 *
203 *     + location and size of the RTEMS Workspace
204 *     + required number of each object type
205 *     + microseconds per clock tick
206 *     + clock ticks per task timeslice
207 */
208
209struct Configuration_Table {
210  void                             *work_space_start;
211  unsigned32                        work_space_size;
212  unsigned32                        maximum_tasks;
213  unsigned32                        maximum_timers;
214  unsigned32                        maximum_semaphores;
215  unsigned32                        maximum_message_queues;
216  unsigned32                        maximum_partitions;
217  unsigned32                        maximum_regions;
218  unsigned32                        maximum_ports;
219  unsigned32                        maximum_periods;
220  unsigned32                        maximum_extensions;
221  unsigned32                        microseconds_per_tick;
222  unsigned32                        ticks_per_timeslice;
223  unsigned32                        number_of_initialization_tasks;
224  rtems_initialization_tasks_table *User_initialization_tasks_table;
225  unsigned32                        number_of_device_drivers;
226  rtems_driver_address_table       *Device_driver_table;
227  rtems_extensions_table           *User_extension_table;
228  rtems_multiprocessing_table      *User_multiprocessing_table;
229};
230
231/*
232 *  The following defines the default Multiprocessing Configuration
233 *  Table.  This table is used in a single processor system.
234 */
235
236extern const rtems_multiprocessing_table
237  _Configuration_Default_multiprocessing_table;
238
239/*
240 *  The following define the internal pointers to the user's
241 *  configuration information.
242 */
243
244EXTERN rtems_configuration_table   *_Configuration_Table;
245EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
246EXTERN rtems_mpci_table            *_Configuration_MPCI_table;
247
248/*
249 *
250 *  _Configuration_Handler_initialization
251 *
252 *  DESCRIPTION:
253 *
254 *  This routine performs the initialization necessary for this handler.
255 */
256
257STATIC INLINE void _Configuration_Handler_initialization(
258  rtems_configuration_table   *configuration_table,
259  rtems_multiprocessing_table *multiprocessing_table,
260  rtems_mpci_table            *users_mpci_table
261);
262
263/*
264 *  _Configuration_Is_multiprocessing
265 *
266 *  DESCRIPTION:
267 *
268 *  This function determines if a multiprocessing application has been
269 *  configured, if so, TRUE is returned, otherwise FALSE is returned.
270 */
271
272STATIC INLINE boolean _Configuration_Is_multiprocessing( void );
273
274/*
275 *  _Configuration_Is_null_driver_address_table_pointer
276 *
277 *  DESCRIPTION:
278 *
279 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
280 */
281
282STATIC INLINE boolean _Configuration_Is_null_driver_address_table_pointer(
283  rtems_driver_address_table *the_table
284);
285
286/*
287 *  _Configuration_Is_null_extension_table_pointer
288 *
289 *  DESCRIPTION:
290 *
291 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
292 */
293
294STATIC INLINE boolean _Configuration_Is_null_extension_table_pointer(
295  rtems_extensions_table *the_table
296);
297
298/*
299 *  _Configuration_Is_null_initialization_tasks_table_pointer
300 *
301 *  DESCRIPTION:
302 *
303 *  This function returns TRUE if the_table is NULL and FALSE otherwise.
304 */
305
306STATIC INLINE boolean
307    _Configuration_Is_null_initialization_tasks_table_pointer(
308  rtems_initialization_tasks_table *the_table
309);
310
311#include <rtems/config.inl>
312
313#ifdef __cplusplus
314}
315#endif
316
317#endif
318/* end of include file */
Note: See TracBrowser for help on using the repository browser.