Changeset ba46b936 in rtems


Ignore:
Timestamp:
Feb 14, 2020, 1:04:21 PM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
ba74ebde
Parents:
567455b6
git-author:
Sebastian Huber <sebastian.huber@…> (02/14/20 13:04:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/25/20 06:15:19)
Message:

config: Add _SMP_Is_enabled

Move the is SMP enabled configuration constant out of the
configuration table.

Since this was the last configuration constant in
rtems_configuration_table, remove this type.

Update #3875.

Location:
cpukit
Files:
4 edited

Legend:

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

    r567455b6 rba46b936  
    26342634  #endif
    26352635
    2636   /**
    2637    * This is the primary Configuration Table for this application.
    2638    */
    2639   const rtems_configuration_table Configuration = {
    2640     #ifdef RTEMS_SMP
     2636  #ifdef RTEMS_SMP
     2637    const bool _SMP_Is_enabled =
    26412638      #ifdef _CONFIGURE_SMP_APPLICATION
    2642         true
     2639        true;
    26432640      #else
    2644         false
     2641        false;
    26452642      #endif
    2646     #endif
    2647   };
    2648 
    2649   #ifdef RTEMS_SMP
     2643
    26502644    const uint32_t _SMP_Processor_configured_maximum =
    26512645      _CONFIGURE_MAXIMUM_PROCESSORS;
  • cpukit/include/rtems/config.h

    r567455b6 rba46b936  
    7272 */
    7373typedef Stack_Allocator_free rtems_stack_free_hook;
    74 
    75 /*
    76  *  The following records define the Configuration Table.  The
    77  *  information contained in this table is required in all
    78  *  RTEMS systems, whether single or multiprocessor.  This
    79  *  table primarily defines the following:
    80  *
    81  *     + location and size of the RTEMS Workspace
    82  *     + microseconds per clock tick
    83  *     + clock ticks per task timeslice
    84  *     + required number of each object type for each API configured
    85  */
    86 typedef struct {
    87   #ifdef RTEMS_SMP
    88     bool                         smp_enabled;
    89   #endif
    90 } rtems_configuration_table;
    91 
    92 /**
    93  * This is the configuration table generated by confdefs.h.
    94  */
    95 extern const rtems_configuration_table Configuration;
    9674
    9775/*
     
    183161 * @retval false Otherwise.
    184162 */
    185 #ifdef RTEMS_SMP
    186   #define rtems_configuration_is_smp_enabled() \
    187         (Configuration.smp_enabled)
    188 #else
    189   #define rtems_configuration_is_smp_enabled() \
    190         false
    191 #endif
     163#define rtems_configuration_is_smp_enabled() \
     164      (_SMP_Is_enabled)
    192165
    193166/**
  • cpukit/include/rtems/score/smp.h

    r567455b6 rba46b936  
    3636 * @{
    3737 */
     38
     39/**
     40 * @brief Indicates if SMP is enabled.
     41 *
     42 * In SMP configurations, this constant is defined by the application
     43 * configuration via <rtems/confdefs.h>, otherwise it is a compile-time
     44 * constant with the value false.
     45 */
     46#if defined(RTEMS_SMP)
     47  extern const bool _SMP_Is_enabled;
     48#else
     49  #define _SMP_Is_enabled false
     50#endif
    3851
    3952/**
  • cpukit/libmisc/monitor/mon-mpci.c

    r567455b6 rba46b936  
    7676
    7777    *next_id += 1;
    78     return &Configuration;
     78    return (const void *) (uintptr_t) 1;
    7979
    8080failed:
Note: See TracChangeset for help on using the changeset viewer.