source: rtems/cpukit/sapi/include/rtems/config.h @ 3235ad9

4.104.114.84.95
Last change on this file since 3235ad9 was 3235ad9, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 23, 1995 at 7:30:23 PM

Support for variable length names added to Object Handler. This supports
both fixed length "raw" names and strings from the API's point of view.

Both inline and macro implementations were tested.

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