Changeset aac75d3b in rtems


Ignore:
Timestamp:
Dec 15, 2008, 7:21:01 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
bb9c80df
Parents:
197170b0
Message:

2008-12-15 Joel Sherrill <joel.sherrill@…>

  • itron/include/rtems/itron/itronapi.h, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-mpci.c, posix/include/rtems/posix/config.h, posix/include/rtems/posix/posixapi.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/src/taskinitusers.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/itronapi.c, sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/isr.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Eliminate pointers to API configuration tables in the main configuration table. Reference the main configuration table and the API configuration tables directly using the confdefs.h version rather than obtaining a pointer to it. This eliminated some variables, a potential fatal error, some unnecessary default configuration structures. Overall, about a 4.5% reduction in the code size for minimum and hello on the SPARC.
Location:
cpukit
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r197170b0 raac75d3b  
     12008-12-15      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * itron/include/rtems/itron/itronapi.h, libmisc/capture/capture.c,
     4        libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c,
     5        libmisc/monitor/mon-itask.c, libmisc/monitor/mon-mpci.c,
     6        posix/include/rtems/posix/config.h,
     7        posix/include/rtems/posix/posixapi.h,
     8        rtems/include/rtems/rtems/config.h,
     9        rtems/include/rtems/rtems/rtemsapi.h, rtems/src/taskinitusers.c,
     10        sapi/include/confdefs.h, sapi/include/rtems/config.h,
     11        sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/itronapi.c,
     12        sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/isr.c,
     13        score/src/thread.c, score/src/threadcreateidle.c,
     14        score/src/threadstackallocate.c, score/src/threadstackfree.c,
     15        score/src/wkspace.c: Eliminate pointers to API configuration tables
     16        in the main configuration table. Reference the main configuration
     17        table and the API configuration tables directly using the confdefs.h
     18        version rather than obtaining a pointer to it. This eliminated some
     19        variables, a potential fatal error, some unnecessary default
     20        configuration structures. Overall, about a 4.5% reduction in the code
     21        size for minimum and hello on the SPARC.
     22
    1232008-12-15      Joel Sherrill <joel.sherrill@oarcorp.com>
    224
  • cpukit/itron/include/rtems/itron/itronapi.h

    r197170b0 raac75d3b  
    44
    55/*
    6  *  ITRON API Support
    7  *
    8  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    97 *  On-Line Applications Research Corporation (OAR).
    108 *
     
    2119#include <rtems/config.h>
    2220
    23 /*
    24  *  _ITRON_API_Initialize
     21/**
     22 *  @brief Initialize ITRON API
    2523 *
    26  *  Initialize the ITRON API.
     24 *  This method is used to initialize the ITRON API.
    2725 */
     26void _ITRON_API_Initialize(void);
    2827
    29 void _ITRON_API_Initialize(
    30   rtems_configuration_table *configuration_table
    31 );
     28/**
     29 *  @brief ITRON API Cofniguration Table
     30 *
     31 *  This is the ITRON API Configuration Table expected to be generated
     32 *  by confdefs.h.
     33 */
     34extern itron_api_configuration_table Configuration_ITRON_API;
    3235
    3336#endif
  • cpukit/libmisc/capture/capture.c

    r197170b0 raac75d3b  
    10401040   * Get the tick period from the BSP Configuration Table.
    10411041   */
    1042   capture_tick_period = _Configuration_Table->microseconds_per_tick;
     1042  capture_tick_period = Configuration.microseconds_per_tick;
    10431043
    10441044  /*
  • cpukit/libmisc/monitor/mon-config.c

    r197170b0 raac75d3b  
    3434{
    3535    rtems_configuration_table *c = (rtems_configuration_table *) config_void;
    36     rtems_api_configuration_table *r = c->RTEMS_api_configuration;
     36    rtems_api_configuration_table *r = &Configuration_RTEMS_API;
    3737
    38     canonical_config->work_space_start = c->work_space_start;
     38    canonical_config->work_space_start = NULL;  /* no longer in structure */
    3939    canonical_config->work_space_size = c->work_space_size;
    4040    canonical_config->maximum_tasks = r->maximum_tasks;
     
    6464)
    6565{
    66     rtems_configuration_table *c = _Configuration_Table;
     66    rtems_configuration_table *c = &Configuration;
    6767    int n = rtems_object_id_get_index(*next_id);
    6868
  • cpukit/libmisc/monitor/mon-driver.c

    r197170b0 raac75d3b  
    6868)
    6969{
    70     rtems_configuration_table *c = _Configuration_Table;
     70    rtems_configuration_table *c = &Configuration;
    7171    uint32_t   n = rtems_object_id_get_index(*next_id);
    7272
  • cpukit/libmisc/monitor/mon-itask.c

    r197170b0 raac75d3b  
    4444)
    4545{
    46     rtems_configuration_table *c = _Configuration_Table;
    4746    rtems_initialization_tasks_table *itask;
    4847    uint32_t   n = rtems_object_id_get_index(*next_id);
    4948
    50     if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
     49    if (n >= Configuration_RTEMS_API.number_of_initialization_tasks)
    5150        goto failed;
    5251
    5352    _Thread_Disable_dispatch();
    5453
    55     itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
     54    itask = Configuration_RTEMS_API.User_initialization_tasks_table + n;
    5655
    5756    /*
  • cpukit/libmisc/monitor/mon-mpci.c

    r197170b0 raac75d3b  
    3232)
    3333{
    34     rtems_configuration_table *c = _Configuration_Table;
     34    rtems_configuration_table *c = &Configuration;
    3535    rtems_multiprocessing_table *m;
    3636    rtems_mpci_table *mt;
     
    7474)
    7575{
    76     rtems_configuration_table *c = _Configuration_Table;
     76    rtems_configuration_table *c = &Configuration;
    7777    int n = rtems_object_id_get_index(*next_id);
    7878
  • cpukit/posix/include/rtems/posix/config.h

    r197170b0 raac75d3b  
    11/**
    22 * @file rtems/posix/config.h
    3  */
    4 
    5 /*  config.h
    63 *
    74 *  This include file contains the table of user defined configuration
    85 *  parameters specific for the POSIX API.
    9  *
    10  *  COPYRIGHT (c) 1989-1999.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2008.
    1110 *  On-Line Applications Research Corporation (OAR).
    1211 *
     
    6261} posix_api_configuration_table;
    6362
     63/**
     64 *  @brief POSIX API Cofniguration Table
     65 *
     66 *  This is the POSIX API Configuration Table expected to be generated
     67 *  by confdefs.h.
     68 */
     69extern posix_api_configuration_table Configuration_POSIX_API;
     70
    6471#ifdef __cplusplus
    6572}
  • cpukit/posix/include/rtems/posix/posixapi.h

    r197170b0 raac75d3b  
    44
    55/*
    6  *  POSIX API Support
    7  *
    8  *  NOTE:
    9  *
    10  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    117 *  On-Line Applications Research Corporation (OAR).
    128 *
     
    2319#include <rtems/config.h>
    2420
    25 /*PAGE
     21/**
     22 *  @brief Initialize POSIX API
    2623 *
    27  *  _POSIX_API_Initialize
    28  *
    29  *  XXX
     24 *  This method is responsible for initializing each of the POSIX
     25 *  API managers.
    3026 */
    31 
    32 void _POSIX_API_Initialize(
    33   rtems_configuration_table *configuration_table
    34 );
     27void _POSIX_API_Initialize(void);
    3528
    3629#endif
  • cpukit/rtems/include/rtems/rtems/config.h

    r197170b0 raac75d3b  
    118118
    119119/**
     120 *  @brief RTEMS API Configuration Table
     121 *
     122 *  This is the RTEMS API Configuration Table expected to be generated
     123 *  by confdefs.h.
     124 */
     125extern rtems_api_configuration_table Configuration_RTEMS_API;
     126
     127/**@}*/
     128
     129/**
    120130 *  This macro returns the value of the notepads enabled field
    121131 *  in the Classic API configuration table.
  • cpukit/rtems/include/rtems/rtems/rtemsapi.h

    r197170b0 raac75d3b  
    3232 *  from the configuration_table.
    3333 */
    34 void _RTEMS_API_Initialize(
    35   rtems_configuration_table *configuration_table
    36 );
    37 
    38 /**@}*/
     34void _RTEMS_API_Initialize(void);
    3935
    4036#endif
  • cpukit/rtems/src/taskinitusers.c

    r197170b0 raac75d3b  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-2007.
     5 *  COPYRIGHT (c) 1989-2008.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    2323#include <rtems/rtems/modes.h>
    2424#include <rtems/score/object.h>
     25#include <rtems/rtems/rtemsapi.h>
    2526#include <rtems/score/stack.h>
    2627#include <rtems/score/states.h>
     
    5657
    5758
    58   api_configuration = _Configuration_Table->RTEMS_api_configuration;
     59  api_configuration = &Configuration_RTEMS_API;
    5960
    6061  /*
  • cpukit/sapi/include/confdefs.h

    r197170b0 raac75d3b  
    806806#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE
    807807
    808   #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA
    809     #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA     NULL
    810   #endif
    811 
    812808  #ifndef CONFIGURE_MAXIMUM_TASKS
    813809    #define CONFIGURE_MAXIMUM_TASKS               0
     
    18571853   */
    18581854  rtems_configuration_table Configuration = {
    1859     CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
     1855    NULL,                                     /* filled in by BSP */
    18601856    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
    18611857    CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
     
    18761872      CONFIGURE_MULTIPROCESSING_TABLE,        /* pointer to MP config table */
    18771873    #endif
    1878     &Configuration_RTEMS_API,                 /* pointer to RTEMS API config */
    1879     #ifdef RTEMS_POSIX_API
    1880       &Configuration_POSIX_API,               /* pointer to POSIX API config */
    1881     #else
    1882       NULL,                                   /* pointer to POSIX API config */
    1883     #endif
    1884     #ifdef RTEMS_ITRON_API
    1885       &Configuration_ITRON_API                /* pointer to ITRON API config */
    1886     #else
    1887       NULL                                    /* pointer to ITRON API config */
    1888     #endif
    18891874  };
    18901875#endif
  • cpukit/sapi/include/rtems/config.h

    r197170b0 raac75d3b  
    171171  uint32_t                       number_of_initial_extensions;
    172172  rtems_extensions_table        *User_extension_table;
    173 #if defined(RTEMS_MULTIPROCESSING)
    174   rtems_multiprocessing_table   *User_multiprocessing_table;
    175 #endif
    176   rtems_api_configuration_table *RTEMS_api_configuration;
    177   posix_api_configuration_table *POSIX_api_configuration;
    178   itron_api_configuration_table *ITRON_api_configuration;
     173  #if defined(RTEMS_MULTIPROCESSING)
     174    rtems_multiprocessing_table   *User_multiprocessing_table;
     175  #endif
    179176} rtems_configuration_table;
    180177
    181 /*
    182  *  The following are provided strictly for the convenience of
    183  *  the user.  They are not used in RTEMS itself.
    184  */
    185 
    186 SAPI_EXTERN rtems_configuration_table    *_Configuration_Table;
    187 #if defined(RTEMS_MULTIPROCESSING)
     178/**
     179 *   This is the configuration table generated by confdefs.h.
     180 */
     181extern rtems_configuration_table        Configuration;
     182
     183#if defined(RTEMS_MULTIPROCESSING)
     184  /**
     185   *   This points to the multiprocessing configuration table.
     186   */
    188187  SAPI_EXTERN rtems_multiprocessing_table  *_Configuration_MP_table;
    189188#endif
     
    195194
    196195#define rtems_configuration_get_table() \
    197         (&_Configuration_Table)
     196        (&Configuration)
    198197
    199198#define rtems_configuration_get_work_space_start() \
     
    204203
    205204#define rtems_configuration_get_maximum_extensions() \
    206         (_Configuration_Table->maximum_extensions)
     205        (Configuration.maximum_extensions)
    207206
    208207#define rtems_configuration_get_microseconds_per_tick() \
    209         (_Configuration_Table->microseconds_per_tick)
     208        (Configuration.microseconds_per_tick)
    210209#define rtems_configuration_get_milliseconds_per_tick() \
    211         (_Configuration_Table->microseconds_per_tick / 1000)
     210        (Configuration.microseconds_per_tick / 1000)
    212211
    213212#define rtems_configuration_get_ticks_per_timeslice() \
    214         (_Configuration_Table->ticks_per_timeslice)
     213        (Configuration.ticks_per_timeslice)
    215214
    216215#define rtems_configuration_get_idle_task() \
    217         (_Configuration_Table->idle_task)
     216        (Configuration.idle_task)
    218217
    219218#define rtems_configuration_get_idle_task_stack_size() \
    220         (_Configuration_Table->idle_task_stack_size)
     219        (Configuration.idle_task_stack_size)
    221220
    222221/* XXX We need to get this from the generated table
     
    230229
    231230#define rtems_configuration_get_stack_allocate_hook() \
    232         (_Configuration_Table->stack_allocate_hook)
     231        (Configuration.stack_allocate_hook)
    233232
    234233#define rtems_configuration_get_stack_free_hook() \
    235         (_Configuration_Table->stack_free_hook)
     234        (Configuration.stack_free_hook)
    236235 
    237236/**
     
    240239  */
    241240#define rtems_configuration_get_do_zero_of_workspace() \
    242    (_Configuration_Table->do_zero_of_workspace)
     241   (Configuration.do_zero_of_workspace)
    243242
    244243#define rtems_configuration_get_number_of_device_drivers() \
    245         (_Configuration_Table->number_of_device_drivers)
     244        (Configuration.number_of_device_drivers)
    246245
    247246#define rtems_configuration_get_device_driver_table() \
    248         (_Configuration_Table->device_driver_table)
     247        (Configuration.device_driver_table)
    249248
    250249#define rtems_configuration_get_number_of_initial_extensions() \
    251         (_Configuration_Table->number_of_initial_extensions)
     250        (Configuration.number_of_initial_extensions)
    252251
    253252#define rtems_configuration_get_user_extension_table() \
    254         (_Configuration_Table->user_extension_table)
     253        (Configuration.user_extension_table)
    255254
    256255#if defined(RTEMS_MULTIPROCESSING)
    257256  #define rtems_configuration_get_user_multiprocessing_table() \
    258           (_Configuration_Table->User_multiprocessing_table)
     257          (Configuration.User_multiprocessing_table)
    259258#else
    260259  #define rtems_configuration_get_user_multiprocessing_table() NULL
     
    262261
    263262#define rtems_configuration_get_rtems_api_configuration() \
    264         (_Configuration_Table->RTEMS_api_configuration)
     263        (&Configuration_RTEMS_API)
    265264
    266265#define rtems_configuration_get_posix_api_configuration() \
    267         (_Configuration_Table->POSIX_api_configuration)
     266        (&Configuration_POSIX_API)
    268267
    269268#define rtems_configuration_get_itron_api_configuration() \
    270         (_Configuration_Table->ITRON_api_configuration)
     269        (&Configuration_ITRON_API)
    271270
    272271#ifdef __cplusplus
  • cpukit/sapi/include/rtems/init.h

    r197170b0 raac75d3b  
    1616 
    1717/*
    18  *  COPYRIGHT (c) 1989-1999.
     18 *  COPYRIGHT (c) 1989-2008.
    1919 *  On-Line Applications Research Corporation (OAR).
    2020 *
     
    5353 *  can occur in a consistent manner.
    5454 */
    55 void rtems_initialize_data_structures(
    56   rtems_configuration_table *configuration_table
    57 );
     55void rtems_initialize_data_structures(void);
    5856
    5957/**
  • cpukit/sapi/src/exinit.c

    r197170b0 raac75d3b  
    5454#include <rtems/rtems/rtemsapi.h>
    5555#ifdef RTEMS_POSIX_API
    56 #include <rtems/posix/posixapi.h>
     56  #include <rtems/posix/posixapi.h>
    5757#endif
    5858#ifdef RTEMS_ITRON_API
    59 #include <rtems/itron/itronapi.h>
     59  #include <rtems/itron/itronapi.h>
    6060#endif
    6161
    6262Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
    6363
    64 void rtems_initialize_data_structures(
    65   rtems_configuration_table *configuration_table
    66 )
    67 {
    68   rtems_interrupt_level        bsp_level;
     64void rtems_initialize_data_structures(void)
     65{
     66  rtems_interrupt_level  bsp_level;
    6967
    7068  /*
     
    7674
    7775  /*
    78    *  Make sure the parameters were not NULL.
    79    */
    80   if ( configuration_table == NULL )
    81     _Internal_error_Occurred(
    82       INTERNAL_ERROR_CORE,
    83       TRUE,
    84       INTERNAL_ERROR_NO_CONFIGURATION_TABLE
    85     );
    86 
    87   /*
    88    *  Provide pointers just for later convenience.
    89    */
    90   _Configuration_Table    = configuration_table;
    91 
    92   /*
    9376   * Initialize any target architecture specific support as early as possible
    9477   */
    9578  _CPU_Initialize( _Thread_Dispatch );
    9679
    97 #if defined(RTEMS_MULTIPROCESSING)
    98   /*
    99    *  Initialize the system state based on whether this is an MP system.
    100    *  In an MP configuration, internally we view single processor
    101    *  systems as a very restricted multiprocessor system.
    102    */
    103   _Configuration_MP_table = configuration_table->User_multiprocessing_table;
    104 
    105   if ( _Configuration_MP_table == NULL ) {
    106     _Configuration_MP_table =
    107       (void *)&_Initialization_Default_multiprocessing_table;
     80  #if defined(RTEMS_MULTIPROCESSING)
     81    /*
     82     *  Initialize the system state based on whether this is an MP system.
     83     *  In an MP configuration, internally we view single processor
     84     *  systems as a very restricted multiprocessor system.
     85     */
     86    _Configuration_MP_table = Configuration.User_multiprocessing_table;
     87
     88    if ( _Configuration_MP_table == NULL ) {
     89      _Configuration_MP_table =
     90        (void *)&_Initialization_Default_multiprocessing_table;
     91      _System_state_Handler_initialization( FALSE );
     92    } else {
     93      _System_state_Handler_initialization( TRUE );
     94    }
     95  #else
    10896    _System_state_Handler_initialization( FALSE );
    109   } else {
    110     _System_state_Handler_initialization( TRUE );
    111   }
    112 #else
    113   _System_state_Handler_initialization( FALSE );
    114 #endif
    115 
    116   /*
    117    *  Do this as early as possible to insure no debugging output
     97  #endif
     98
     99  /*
     100   *  Do this as early as possible to ensure no debugging output
    118101   *  is even attempted to be printed.
    119102   */
     
    130113   */
    131114  _Workspace_Handler_initialization(
    132      (void *)configuration_table->work_space_start,
    133      configuration_table->work_space_size
     115    Configuration.work_space_start,
     116    Configuration.work_space_size
    134117  );
    135118
    136119  _User_extensions_Handler_initialization(
    137     configuration_table->number_of_initial_extensions,
    138     configuration_table->User_extension_table
     120    Configuration.number_of_initial_extensions,
     121    Configuration.User_extension_table
    139122  );
    140123
     
    142125
    143126  _Objects_Handler_initialization(
    144 #if defined(RTEMS_MULTIPROCESSING)
    145     _Configuration_MP_table->node,
    146     _Configuration_MP_table->maximum_nodes,
    147     _Configuration_MP_table->maximum_global_objects
    148 #endif
     127    #if defined(RTEMS_MULTIPROCESSING)
     128      _Configuration_MP_table->node,
     129      _Configuration_MP_table->maximum_nodes,
     130      _Configuration_MP_table->maximum_global_objects
     131    #endif
    149132  );
    150133
     
    161144  _Watchdog_Handler_initialization();
    162145
    163   _TOD_Handler_initialization( configuration_table->microseconds_per_tick );
     146  _TOD_Handler_initialization( Configuration.microseconds_per_tick );
    164147
    165148  _Thread_Handler_initialization(
    166     configuration_table->ticks_per_timeslice,
    167     configuration_table->maximum_extensions
    168 #if defined(RTEMS_MULTIPROCESSING)
    169     ,
    170     _Configuration_MP_table->maximum_proxies
    171 #endif
    172   );
    173 
    174 #if defined(RTEMS_MULTIPROCESSING)
    175   _MPCI_Handler_initialization(
    176     _Configuration_MP_table->User_mpci_table,
    177     RTEMS_TIMEOUT
    178   );
    179 #endif
     149    Configuration.ticks_per_timeslice,
     150    Configuration.maximum_extensions
     151    #if defined(RTEMS_MULTIPROCESSING)
     152      ,
     153      _Configuration_MP_table->maximum_proxies
     154    #endif
     155  );
     156
     157  #if defined(RTEMS_MULTIPROCESSING)
     158    _MPCI_Handler_initialization(
     159      _Configuration_MP_table->User_mpci_table,
     160      RTEMS_TIMEOUT
     161    );
     162  #endif
    180163
    181164/* MANAGERS */
    182165
    183   _RTEMS_API_Initialize( configuration_table );
    184 
    185   _Extension_Manager_initialization( configuration_table->maximum_extensions );
     166  _RTEMS_API_Initialize();
     167
     168  _Extension_Manager_initialization( Configuration.maximum_extensions );
    186169
    187170  _IO_Manager_initialization(
    188     configuration_table->Device_driver_table,
    189     configuration_table->number_of_device_drivers,
    190     configuration_table->maximum_drivers
    191   );
    192 
    193 #ifdef RTEMS_POSIX_API
    194   _POSIX_API_Initialize( configuration_table );
    195 #endif
    196 
    197 #ifdef RTEMS_ITRON_API
    198   _ITRON_API_Initialize( configuration_table );
    199 #endif
     171    Configuration.Device_driver_table,
     172    Configuration.number_of_device_drivers,
     173    Configuration.maximum_drivers
     174  );
     175
     176  #ifdef RTEMS_POSIX_API
     177    _POSIX_API_Initialize();
     178  #endif
     179
     180  #ifdef RTEMS_ITRON_API
     181    _ITRON_API_Initialize();
     182  #endif
    200183
    201184  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
     
    219202{
    220203
    221 #if defined(RTEMS_MULTIPROCESSING)
    222   _MPCI_Create_server();
    223 #endif
     204  #if defined(RTEMS_MULTIPROCESSING)
     205    _MPCI_Create_server();
     206  #endif
    224207
    225208  /*
     
    241224  _IO_Initialize_all_drivers();
    242225
    243 #if defined(RTEMS_MULTIPROCESSING)
    244   if ( _System_state_Is_multiprocessing ) {
    245     _MPCI_Initialization();
    246     _MPCI_Internal_packets_Send_process_packet(
    247       MPCI_PACKETS_SYSTEM_VERIFY
    248     );
    249   }
    250 #endif
     226  #if defined(RTEMS_MULTIPROCESSING)
     227    if ( _System_state_Is_multiprocessing ) {
     228      _MPCI_Initialization();
     229      _MPCI_Internal_packets_Send_process_packet(
     230        MPCI_PACKETS_SYSTEM_VERIFY
     231      );
     232    }
     233  #endif
    251234
    252235  /*
  • cpukit/sapi/src/itronapi.c

    r197170b0 raac75d3b  
    44 *  NOTE:
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    3838#include <rtems/itron/eventflags.h>
    3939#include <rtems/itron/fmempool.h>
     40#include <rtems/itron/itronapi.h>
    4041#include <rtems/itron/mbox.h>
    4142#include <rtems/itron/msgbuffer.h>
     
    5253 */
    5354
    54 const itron_api_configuration_table _ITRON_Default_configuration = {
    55   0,                             /* maximum_tasks */
    56   0,                             /* maximum_semaphores */
    57   0,                             /* maximum_eventflags */
    58   0,                             /* maximum_mailboxes */
    59   0,                             /* maximum_message_buffers */
    60   0,                             /* maximum_ports */
    61   0,                             /* maximum_memory_pools */
    62   0,                             /* maximum_fixed_memory_pools */
    63   0,                             /* number_of_initialization_tasks */
    64   NULL                           /* User_initialization_tasks_table */
    65 };
    66 
    6755Objects_Information *_ITRON_Objects[ OBJECTS_ITRON_CLASSES_LAST + 1 ];
    6856
    69 void _ITRON_API_Initialize(
    70   rtems_configuration_table *configuration_table
    71 )
     57void _ITRON_API_Initialize(void)
    7258{
    73   const itron_api_configuration_table *api_configuration;
     59  const itron_api_configuration_table *api;
    7460
    7561  /* XXX need to assert here based on size assumptions */
     
    7763  assert( sizeof(ID) == sizeof(Objects_Id) );
    7864
    79   api_configuration = configuration_table->ITRON_api_configuration;
    80   if ( !api_configuration )
    81     api_configuration = &_ITRON_Default_configuration;
     65  /*
     66   * Install our API Object Management Table and initialize the
     67   * various managers.
     68   */
     69  api = &Configuration_ITRON_API;
    8270
    8371  _Objects_Information_table[OBJECTS_ITRON_API] = _ITRON_Objects;
    8472
    8573  _ITRON_Task_Manager_initialization(
    86     api_configuration->maximum_tasks,
    87     api_configuration->number_of_initialization_tasks,
    88     api_configuration->User_initialization_tasks_table
     74    api->maximum_tasks,
     75    api->number_of_initialization_tasks,
     76    api->User_initialization_tasks_table
    8977  );
    9078
    91   _ITRON_Semaphore_Manager_initialization(
    92     api_configuration->maximum_semaphores
     79  _ITRON_Semaphore_Manager_initialization( api->maximum_semaphores );
     80
     81  _ITRON_Eventflags_Manager_initialization( api->maximum_eventflags );
     82
     83  _ITRON_Fixed_memory_pool_Manager_initialization(
     84    api->maximum_fixed_memory_pools
    9385  );
    9486
    95   _ITRON_Eventflags_Manager_initialization(
    96     api_configuration->maximum_eventflags
    97   );
     87  _ITRON_Mailbox_Manager_initialization( api->maximum_mailboxes );
    9888
    99   _ITRON_Fixed_memory_pool_Manager_initialization(
    100     api_configuration->maximum_fixed_memory_pools
    101   );
     89  _ITRON_Message_buffer_Manager_initialization( api->maximum_message_buffers );
    10290
    103   _ITRON_Mailbox_Manager_initialization(
    104     api_configuration->maximum_mailboxes
    105   );
     91  _ITRON_Port_Manager_initialization( api->maximum_ports );
    10692
    107   _ITRON_Message_buffer_Manager_initialization(
    108     api_configuration->maximum_message_buffers
    109   );
    110 
    111   _ITRON_Port_Manager_initialization(
    112     api_configuration->maximum_ports
    113   );
    114 
    115   _ITRON_Variable_memory_pool_Manager_initialization(
    116     api_configuration->maximum_memory_pools
    117   );
    118 
    119 
     93  _ITRON_Variable_memory_pool_Manager_initialization(api->maximum_memory_pools);
    12094}
    12195
  • cpukit/sapi/src/posixapi.c

    r197170b0 raac75d3b  
    44 *  NOTE:
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    4040#include <rtems/posix/mqueue.h>
    4141#include <rtems/posix/mutex.h>
     42#include <rtems/posix/posixapi.h>
    4243#include <rtems/posix/priority.h>
    4344#include <rtems/posix/psignal.h>
     
    5657 */
    5758
    58 const posix_api_configuration_table _POSIX_Default_configuration = {
    59   0,                             /* maximum_threads */
    60   0,                             /* maximum_mutexes */
    61   0,                             /* maximum_condition_variables */
    62   0,                             /* maximum_keys */
    63   0,                             /* maximum_timers */
    64   0,                             /* maximum_queued_signals */
    65   0,                             /* number_of_initialization_threads */
    66   0,                             /* maximum_message_queues */
    67   0,                             /* maximum_semaphores */
    68   0,                             /* maximum_barriers */
    69   0,                             /* maximum_spinlocks */
    70   0,                             /* maximum_rwlocks */
    71   NULL                           /* User_initialization_threads_table */
    72 };
    73 
    7459Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
    7560
    76 
    77 void _POSIX_API_Initialize(
    78   rtems_configuration_table *configuration_table
    79 )
     61void _POSIX_API_Initialize(void)
    8062{
    81   const posix_api_configuration_table *api_configuration;
     63  const posix_api_configuration_table *api;
    8264
    8365  /* XXX need to assert here based on size assumptions */
     
    8567  assert( sizeof(pthread_t) == sizeof(Objects_Id) );
    8668
    87   api_configuration = configuration_table->POSIX_api_configuration;
    88   if ( !api_configuration )
    89     api_configuration = &_POSIX_Default_configuration;
     69  /*
     70   * Install our API Object Management Table and initialize the
     71   * various managers.
     72   */
     73  api = &Configuration_POSIX_API;
    9074
    9175  _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
    9276
    93   _POSIX_signals_Manager_Initialization(
    94     api_configuration->maximum_queued_signals
    95   );
     77  _POSIX_signals_Manager_Initialization( api->maximum_queued_signals );
    9678
    9779  _POSIX_Threads_Manager_initialization(
    98     api_configuration->maximum_threads,
    99     api_configuration->number_of_initialization_threads,
    100     api_configuration->User_initialization_threads_table
     80    api->maximum_threads,
     81    api->number_of_initialization_threads,
     82    api->User_initialization_threads_table
    10183  );
    10284
    10385  _POSIX_Condition_variables_Manager_initialization(
    104     api_configuration->maximum_condition_variables
     86    api->maximum_condition_variables
    10587  );
    10688
    107   _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
     89  _POSIX_Key_Manager_initialization( api->maximum_keys );
    10890
    109   _POSIX_Mutex_Manager_initialization(
    110     api_configuration->maximum_mutexes
    111   );
     91  _POSIX_Mutex_Manager_initialization( api->maximum_mutexes );
    11292
    113   _POSIX_Message_queue_Manager_initialization(
    114     api_configuration->maximum_message_queues
    115   );
     93  _POSIX_Message_queue_Manager_initialization( api->maximum_message_queues );
    11694
    117   _POSIX_Semaphore_Manager_initialization(
    118     api_configuration->maximum_semaphores
    119   );
     95  _POSIX_Semaphore_Manager_initialization( api->maximum_semaphores );
    12096
    121   _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers );
     97  _POSIX_Timer_Manager_initialization( api->maximum_timers );
    12298
    123   _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
     99  _POSIX_Barrier_Manager_initialization( api->maximum_barriers );
    124100
    125   _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
     101  _POSIX_RWLock_Manager_initialization( api->maximum_rwlocks );
    126102
    127   _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
     103  _POSIX_Spinlock_Manager_initialization(api->maximum_spinlocks);
    128104}
    129105
  • cpukit/sapi/src/rtemsapi.c

    r197170b0 raac75d3b  
    44 *  NOTE:
    55 *
    6  *  COPYRIGHT (c) 1989-1999.
     6 *  COPYRIGHT (c) 1989-2008.
    77 *  On-Line Applications Research Corporation (OAR).
    88 *
     
    5555 */
    5656
    57 void _RTEMS_API_Initialize(
    58   rtems_configuration_table *configuration_table
    59 )
     57void _RTEMS_API_Initialize(void)
    6058{
    61   rtems_api_configuration_table *api_configuration;
     59  rtems_api_configuration_table *api;
    6260
    63   api_configuration = configuration_table->RTEMS_api_configuration;
     61  /*
     62   * Install our API Object Management Table and initialize the
     63   * various managers.
     64   */
     65  api = &Configuration_RTEMS_API;
    6466
    6567  _Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects;
     
    7375#endif
    7476
    75   _RTEMS_tasks_Manager_initialization( api_configuration->maximum_tasks );
     77  _RTEMS_tasks_Manager_initialization( api->maximum_tasks );
    7678
    77   _Timer_Manager_initialization( api_configuration->maximum_timers );
     79  _Timer_Manager_initialization( api->maximum_timers );
    7880
    7981  _Signal_Manager_initialization();
     
    8183  _Event_Manager_initialization();
    8284
    83   _Message_queue_Manager_initialization(
    84     api_configuration->maximum_message_queues
    85   );
     85  _Message_queue_Manager_initialization( api->maximum_message_queues );
    8686
    87   _Semaphore_Manager_initialization( api_configuration->maximum_semaphores );
     87  _Semaphore_Manager_initialization( api->maximum_semaphores );
    8888
    89   _Partition_Manager_initialization( api_configuration->maximum_partitions );
     89  _Partition_Manager_initialization( api->maximum_partitions );
    9090
    91   _Region_Manager_initialization( api_configuration->maximum_regions );
     91  _Region_Manager_initialization( api->maximum_regions );
    9292
    93   _Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
     93  _Dual_ported_memory_Manager_initialization( api->maximum_ports);
    9494
    95   _Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
     95  _Rate_monotonic_Manager_initialization( api->maximum_periods );
    9696
    97   _Barrier_Manager_initialization( api_configuration->maximum_barriers );
     97  _Barrier_Manager_initialization( api->maximum_barriers );
    9898}
    9999
  • cpukit/score/src/isr.c

    r197170b0 raac75d3b  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2008.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    4949#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
    5050
    51   if ( !_Stack_Is_enough(_Configuration_Table->interrupt_stack_size) )
     51  if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
    5252    _Internal_error_Occurred(
    5353      INTERNAL_ERROR_CORE,
     
    5757
    5858  _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
    59     _Configuration_Table->interrupt_stack_size
     59    Configuration.interrupt_stack_size
    6060  );
    6161
    6262  _CPU_Interrupt_stack_high = _Addresses_Add_offset(
    6363    _CPU_Interrupt_stack_low,
    64     _Configuration_Table->interrupt_stack_size
     64    Configuration.interrupt_stack_size
    6565  );
    6666
  • cpukit/score/src/thread.c

    r197170b0 raac75d3b  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-2007.
     5 *  COPYRIGHT (c) 1989-2008.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    6060   * Do not allow mixture.
    6161   */
    62     if ( !( (!_Configuration_Table->stack_allocate_hook)
    63             == (!_Configuration_Table->stack_free_hook) ) )
     62    if ( !( (!Configuration.stack_allocate_hook)
     63            == (!Configuration.stack_free_hook) ) )
    6464    _Internal_error_Occurred(
    6565      INTERNAL_ERROR_CORE,
  • cpukit/score/src/threadcreateidle.c

    r197170b0 raac75d3b  
    6161    _Thread_Idle,
    6262    NULL,        /* allocate the stack */
    63     _Stack_Ensure_minimum( _Configuration_Table->idle_task_stack_size ),
     63    _Stack_Ensure_minimum( Configuration.idle_task_stack_size ),
    6464    CPU_IDLE_TASK_IS_FP,
    6565    PRIORITY_MAXIMUM,
     
    8383    _Thread_Idle,
    8484    THREAD_START_NUMERIC,
    85     _Configuration_Table->idle_task,
     85    Configuration.idle_task,
    8686    NULL,
    8787    0
  • cpukit/score/src/threadstackallocate.c

    r197170b0 raac75d3b  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2008.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    5858   */
    5959
    60   if ( _Configuration_Table->stack_allocate_hook ) {
    61     stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
     60  if ( Configuration.stack_allocate_hook ) {
     61    stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
    6262  } else {
    6363
  • cpukit/score/src/threadstackfree.c

    r197170b0 raac75d3b  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2008.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    5555     */
    5656
    57     if ( _Configuration_Table->stack_free_hook )
    58       (*_Configuration_Table->stack_free_hook)(
     57    if ( Configuration.stack_free_hook )
     58      (*Configuration.stack_free_hook)(
    5959        the_thread->Start.Initial_stack.area
    6060      );
  • cpukit/score/src/wkspace.c

    r197170b0 raac75d3b  
    22 *  Workspace Handler
    33 *
    4  *  COPYRIGHT (c) 1989-2007.
     4 *  COPYRIGHT (c) 1989-2008.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    4040    );
    4141
    42   if ( _Configuration_Table->do_zero_of_workspace )
     42  if ( Configuration.do_zero_of_workspace )
    4343   memset( starting_address, 0, size );
    4444
Note: See TracChangeset for help on using the changeset viewer.