Changeset 6c2eedc in rtems for cpukit/sapi


Ignore:
Timestamp:
May 13, 2013, 11:37:06 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
36a6f58a
Parents:
12c99a64
git-author:
Sebastian Huber <sebastian.huber@…> (05/13/13 11:37:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/16/13 09:44:12)
Message:

smp: Add maximum_processors field to config

Delete rtems_configuration_get_smp_maximum_processors(). Delete
rtems_configuration_smp_maximum_processors variable. Add
maximum_processors field to rtems_configuration_table if RTEMS_SMP is
defined. Add rtems_configuration_get_maximum_processors().

Location:
cpukit/sapi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r12c99a64 r6c2eedc  
    23612361      CONFIGURE_MULTIPROCESSING_TABLE,        /* pointer to MP config table */
    23622362    #endif
     2363    #ifdef RTEMS_SMP
     2364      CONFIGURE_SMP_MAXIMUM_PROCESSORS
     2365    #endif
    23632366  };
    23642367#endif
     
    23672370
    23682371#if defined(RTEMS_SMP)
    2369   /**
    2370    * Instantiate the variable which specifies the number of CPUs
    2371    * in an SMP configuration.
    2372    */
    2373   #if defined(CONFIGURE_INIT)
    2374     uint32_t rtems_configuration_smp_maximum_processors = \
    2375         CONFIGURE_SMP_MAXIMUM_PROCESSORS;
    2376   #else
    2377     extern uint32_t rtems_configuration_smp_maximum_processors;
    2378   #endif
    23792372 /*
    23802373  * Instantiate the Per CPU information based upon the user configuration.
  • cpukit/sapi/include/rtems/config.h

    r12c99a64 r6c2eedc  
    231231    rtems_multiprocessing_table   *User_multiprocessing_table;
    232232  #endif
     233  #ifdef RTEMS_SMP
     234    uint32_t                     maximum_processors;
     235  #endif
    233236} rtems_configuration_table;
    234237
     
    336339#endif
    337340
     341/**
     342 * @brief Returns the configured maximum count of processors.
     343 *
     344 * The actual number of processors available for the application will be less
     345 * than or equal to the configured maximum count of processors.
     346 *
     347 * @return The configured maximum count of processors.
     348 */
     349#ifdef RTEMS_SMP
     350  #define rtems_configuration_get_maximum_processors() \
     351        (Configuration.maximum_processors)
     352#else
     353  #define rtems_configuration_get_maximum_processors() \
     354        1
     355#endif
     356
    338357#define rtems_configuration_get_rtems_api_configuration() \
    339358        (&Configuration_RTEMS_API)
  • cpukit/sapi/src/exinit.c

    r12c99a64 r6c2eedc  
    165165  #if defined(RTEMS_SMP)
    166166    _SMP_Processor_count =
    167         bsp_smp_initialize( rtems_configuration_smp_maximum_processors );
     167        bsp_smp_initialize( rtems_configuration_get_maximum_processors() );
    168168  #endif
    169169
Note: See TracChangeset for help on using the changeset viewer.