Changeset f913c79 in rtems for cpukit/sapi


Ignore:
Timestamp:
Jul 18, 2013, 9:27:39 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
50ccf98
Parents:
0bbd8fdc
git-author:
Sebastian Huber <sebastian.huber@…> (07/18/13 09:27:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/22/13 14:46:01)
Message:

sapi: Add rtems_configuration_is_smp_enabled()

Add a configuration field which indicates if the SMP mode of operation
is enabled. This can be used to disable features unsupported on SMP,
e.g task variables.

Location:
cpukit/sapi/include
Files:
2 edited

Legend:

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

    r0bbd8fdc rf913c79  
    23652365      false,
    23662366    #endif
     2367    #ifdef RTEMS_SMP
     2368      #ifdef CONFIGURE_SMP_APPLICATION
     2369        true,
     2370      #else
     2371        false,
     2372      #endif
     2373    #endif
    23672374    CONFIGURE_MAXIMUM_DRIVERS,                /* maximum device drivers */
    23682375    CONFIGURE_NUMBER_OF_DRIVERS,              /* static device drivers */
  • cpukit/sapi/include/rtems/config.h

    r0bbd8fdc rf913c79  
    222222   */
    223223  bool                           stack_allocator_avoids_work_space;
     224
     225  #ifdef RTEMS_SMP
     226    bool                         smp_enabled;
     227  #endif
    224228
    225229  uint32_t                       maximum_drivers;
     
    340344
    341345/**
     346 * @brief Returns true if the SMP mode of operation is enabled, and false
     347 * otherwise.
     348 *
     349 * On single-processor configurations this is a compile time constant which
     350 * evaluates to false.
     351 *
     352 * @retval true SMP mode of operation is enabled.
     353 * @retval false Otherwise.
     354 */
     355#ifdef RTEMS_SMP
     356  #define rtems_configuration_is_smp_enabled() \
     357        (Configuration.smp_enabled)
     358#else
     359  #define rtems_configuration_is_smp_enabled() \
     360        false
     361#endif
     362
     363/**
    342364 * @brief Returns the configured maximum count of processors.
    343365 *
    344366 * The actual number of processors available for the application will be less
    345367 * than or equal to the configured maximum count of processors.
     368 *
     369 * On single-processor configurations this is a compile time constant which
     370 * evaluates to one.
    346371 *
    347372 * @return The configured maximum count of processors.
Note: See TracChangeset for help on using the changeset viewer.