source: rtems/cpukit/sapi/include/rtems/config.h @ ff3f8c8

4.104.114.84.9
Last change on this file since ff3f8c8 was ff3f8c8, checked in by Joel Sherrill <joel.sherrill@…>, on May 28, 2007 at 3:51:01 PM

2007-05-28 Joel Sherrill <joel.sherrill@…>

  • libmisc/Makefile.am, libmisc/monitor/mon-object.c, libmisc/monitor/monitor.h, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/io.h, sapi/src/exinit.c, sapi/src/io.c: Eliminate maximum_drivers configuration parameter since it was used to configure a no longer used feature. Device names are now part of the filesystem not in a table. This also eliminated the variables _IO_Number_of_devices and _IO_Driver_name_table from RTEMS as well as the memory allocation used to populate _IO_Driver_name_table.
  • libmisc/monitor/mon-dname.c: Removed.
  • Property mode set to 100644
File size: 5.7 KB
Line 
1/**
2 * @file rtems/config.h
3 */
4 
5/*
6 *  This include file contains the table of user defined configuration
7 *  parameters.
8 *
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_CONFIG_H
20#define _RTEMS_CONFIG_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/*
27 *  Unlimited object support. Changes the configuration table entry for POSIX
28 *  or RTEMS APIs to bounded only by the memory of the work-space.
29 *
30 *  Use the macro to define the resource unlimited before placing in
31 *  the configuration table.
32 */
33
34#include <rtems/score/object.h>
35#define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
36
37#define rtems_resource_unlimited(resource) \
38  ( resource | RTEMS_UNLIMITED_OBJECTS )
39
40/*
41 *  This is kind of kludgy but it allows targets to totally ignore the
42 *  optional APIs like POSIX and ITRON safely.
43 */
44
45#ifdef RTEMS_POSIX_API
46#include <rtems/posix/config.h>
47#else
48typedef void *posix_api_configuration_table;
49#endif
50
51#ifdef RTEMS_ITRON_API
52#include <rtems/itron.h>
53#include <rtems/itron/config.h>
54#else
55typedef void *itron_api_configuration_table;
56#endif
57
58#include <rtems/rtems/config.h>
59
60/*  XXX <rtems/rtems/config.h> should cover these
61#include <rtems/rtems/status.h>
62#include <rtems/rtems/types.h>
63#include <rtems/rtems/tasks.h>
64*/
65
66#include <rtems/extension.h>
67#include <rtems/io.h>
68#if defined(RTEMS_MULTIPROCESSING)
69#include <rtems/score/mpci.h>
70#endif
71
72/*
73 *  The following records define the Multiprocessor Configuration
74 *  Table.  This table defines the multiprocessor system
75 *  characteristics which must be known by RTEMS in a multiprocessor
76 *  system.
77 */
78
79typedef struct {
80  uint32_t      node;             /* local node number */
81  uint32_t      maximum_nodes;    /* maximum # nodes in system */
82  uint32_t      maximum_global_objects; /* maximum # global objects */
83  uint32_t      maximum_proxies;  /* maximum # proxies */
84#if defined(RTEMS_MULTIPROCESSING)
85  rtems_mpci_table   *User_mpci_table;  /* pointer to MPCI table */
86#else
87  void         *User_mpci_table;        /* pointer to MPCI table */
88#endif
89} rtems_multiprocessing_table;
90
91/*
92 *  The following records define the Configuration Table.  The
93 *  information contained in this table is required in all
94 *  RTEMS systems, whether single or multiprocessor.  This
95 *  table primarily defines the following:
96 *
97 *     + location and size of the RTEMS Workspace
98 *     + microseconds per clock tick
99 *     + clock ticks per task timeslice
100 *     + required number of each object type for each API configured
101 */
102
103typedef struct {
104  void                          *work_space_start;
105  uint32_t                       work_space_size;
106  uint32_t                       maximum_extensions;
107  uint32_t                       microseconds_per_tick;
108  uint32_t                       ticks_per_timeslice;
109  uint32_t                       maximum_drivers;
110  uint32_t                       number_of_device_drivers;
111  rtems_driver_address_table    *Device_driver_table;
112  uint32_t                       number_of_initial_extensions;
113  rtems_extensions_table        *User_extension_table;
114  rtems_multiprocessing_table   *User_multiprocessing_table;
115  rtems_api_configuration_table *RTEMS_api_configuration;
116  posix_api_configuration_table *POSIX_api_configuration;
117  itron_api_configuration_table *ITRON_api_configuration;
118} rtems_configuration_table;
119
120/*
121 *  The following are provided strictly for the convenience of
122 *  the user.  They are not used in RTEMS itself.
123 */
124
125SAPI_EXTERN rtems_configuration_table    *_Configuration_Table;
126#if defined(RTEMS_MULTIPROCESSING)
127  SAPI_EXTERN rtems_multiprocessing_table  *_Configuration_MP_table;
128#endif
129
130/*
131 *  Some handy macros to avoid dependencies on either the BSP
132 *  or the exact format of the configuration table.
133 */
134
135#define rtems_configuration_get_table() \
136        (&_Configuration_Table)
137
138#define rtems_configuration_get_work_space_start() \
139        (_Configuration_Table->work_space_start)
140
141#define rtems_configuration_get_work_space_size() \
142        (_Configuration_Table->work_space_size)
143
144#define rtems_configuration_get_maximum_extensions() \
145        (_Configuration_Table->maximum_extensions)
146
147#define rtems_configuration_get_microseconds_per_tick() \
148        (_Configuration_Table->microseconds_per_tick)
149#define rtems_configuration_get_milliseconds_per_tick() \
150        (_Configuration_Table->microseconds_per_tick / 1000)
151
152#define rtems_configuration_get_ticks_per_timeslice() \
153        (_Configuration_Table->ticks_per_timeslice)
154
155#define rtems_configuration_get_maximum_devices() \
156        (_Configuration_Table->maximum_devices)
157
158#define rtems_configuration_get_number_of_device_drivers() \
159        (_Configuration_Table->number_of_device_drivers)
160
161#define rtems_configuration_get_device_driver_table() \
162        (_Configuration_Table->device_driver_table)
163
164#define rtems_configuration_get_number_of_initial_extensions() \
165        (_Configuration_Table->number_of_initial_extensions)
166
167#define rtems_configuration_get_user_extension_table() \
168        (_Configuration_Table->user_extension_table)
169
170#define rtems_configuration_get_user_multiprocessing_table() \
171        (_Configuration_Table->User_multiprocessing_table)
172
173#define rtems_configuration_get_rtems_api_configuration() \
174        (_Configuration_Table->RTEMS_api_configuration)
175
176#define rtems_configuration_get_posix_api_configuration() \
177        (_Configuration_Table->POSIX_api_configuration)
178
179#define rtems_configuration_get_itron_api_configuration() \
180        (_Configuration_Table->ITRON_api_configuration)
181
182#ifdef __cplusplus
183}
184#endif
185
186#endif
187/* end of include file */
Note: See TracBrowser for help on using the repository browser.