source: rtems/c/src/exec/sapi/include/rtems/config.h @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

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