Changeset 2ef85b1 in rtems for cpukit/include/rtems/scheduler.h


Ignore:
Timestamp:
Mar 8, 2018, 5:20:10 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
6fadb7af
Parents:
4dfeba3
git-author:
Sebastian Huber <sebastian.huber@…> (03/08/18 05:20:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/12/18 06:01:30)
Message:

config: Simplify clustered scheduler configuration

Do not use names derived from scheduler implementation details. Instead
use names derived from the scheduler configuration or documentation.

Provide defines for backward compatibility.

Update #3325.

File:
1 edited

Legend:

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

    r4dfeba3 r2ef85b1  
    6464    SCHEDULER_CONTEXT_NAME( CBS_ ## name )
    6565
    66   #define RTEMS_SCHEDULER_CONTEXT_CBS( name ) \
     66  #define RTEMS_SCHEDULER_CBS( name ) \
    6767    static Scheduler_EDF_Context SCHEDULER_CBS_CONTEXT_NAME( name )
    6868
    69   #define RTEMS_SCHEDULER_CONTROL_CBS( name, obj_name ) \
     69  #define RTEMS_SCHEDULER_TABLE_CBS( name, obj_name ) \
    7070    { \
    7171      &SCHEDULER_CBS_CONTEXT_NAME( name ).Base, \
     
    7474      ( obj_name ) \
    7575    }
     76
     77  /* Provided for backward compatibility */
     78
     79  #define RTEMS_SCHEDULER_CONTEXT_CBS( name ) \
     80    RTEMS_SCHEDULER_CBS( name )
     81
     82  #define RTEMS_SCHEDULER_CONTROL_CBS( name, obj_name ) \
     83    RTEMS_SCHEDULER_TABLE_CBS( name, obj_name )
    7684#endif
    7785
     
    8290    SCHEDULER_CONTEXT_NAME( EDF_ ## name )
    8391
    84   #define RTEMS_SCHEDULER_CONTEXT_EDF( name ) \
     92  #define RTEMS_SCHEDULER_EDF( name ) \
    8593    static Scheduler_EDF_Context SCHEDULER_EDF_CONTEXT_NAME( name )
    8694
    87   #define RTEMS_SCHEDULER_CONTROL_EDF( name, obj_name ) \
     95  #define RTEMS_SCHEDULER_TABLE_EDF( name, obj_name ) \
    8896    { \
    8997      &SCHEDULER_EDF_CONTEXT_NAME( name ).Base, \
     
    92100      ( obj_name ) \
    93101    }
     102
     103  /* Provided for backward compatibility */
     104
     105  #define RTEMS_SCHEDULER_CONTEXT_EDF( name ) \
     106    RTEMS_SCHEDULER_EDF( name )
     107
     108  #define RTEMS_SCHEDULER_CONTROL_EDF( name, obj_name ) \
     109    RTEMS_SCHEDULER_TABLE_EDF( name, obj_name )
    94110#endif
    95111
     
    100116    SCHEDULER_CONTEXT_NAME( EDF_SMP_ ## name )
    101117
    102   #define RTEMS_SCHEDULER_CONTEXT_EDF_SMP( name, max_cpu_count ) \
     118  #define RTEMS_SCHEDULER_EDF_SMP( name, max_cpu_count ) \
    103119    static struct { \
    104120      Scheduler_EDF_SMP_Context Base; \
     
    106122    } SCHEDULER_EDF_SMP_CONTEXT_NAME( name )
    107123
    108   #define RTEMS_SCHEDULER_CONTROL_EDF_SMP( name, obj_name ) \
     124  #define RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name ) \
    109125    { \
    110126      &SCHEDULER_EDF_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
     
    113129      ( obj_name ) \
    114130    }
     131
     132  /* Provided for backward compatibility */
     133
     134  #define RTEMS_SCHEDULER_CONTEXT_EDF_SMP( name, max_cpu_count ) \
     135    RTEMS_SCHEDULER_EDF_SMP( name, max_cpu_count )
     136
     137  #define RTEMS_SCHEDULER_CONTROL_EDF_SMP( name, obj_name ) \
     138    RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name )
    115139#endif
    116140
     
    121145    SCHEDULER_CONTEXT_NAME( priority_ ## name )
    122146
    123   #define RTEMS_SCHEDULER_CONTEXT_PRIORITY( name, prio_count ) \
     147  #define RTEMS_SCHEDULER_PRIORITY( name, prio_count ) \
    124148    static struct { \
    125149      Scheduler_priority_Context Base; \
     
    127151    } SCHEDULER_PRIORITY_CONTEXT_NAME( name )
    128152
    129   #define RTEMS_SCHEDULER_CONTROL_PRIORITY( name, obj_name ) \
     153  #define RTEMS_SCHEDULER_TABLE_PRIORITY( name, obj_name ) \
    130154    { \
    131155      &SCHEDULER_PRIORITY_CONTEXT_NAME( name ).Base.Base, \
     
    136160      ( obj_name ) \
    137161    }
     162
     163  /* Provided for backward compatibility */
     164
     165  #define RTEMS_SCHEDULER_CONTEXT_PRIORITY( name, prio_count ) \
     166    RTEMS_SCHEDULER_PRIORITY( name, prio_count )
     167
     168  #define RTEMS_SCHEDULER_CONTROL_PRIORITY( name, obj_name ) \
     169    RTEMS_SCHEDULER_TABLE_PRIORITY( name, obj_name )
    138170#endif
    139171
     
    144176    SCHEDULER_CONTEXT_NAME( priority_affinity_SMP_ ## name )
    145177
    146   #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( name, prio_count ) \
     178  #define RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( name, prio_count ) \
    147179    static struct { \
    148180      Scheduler_priority_SMP_Context Base; \
     
    150182    } SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name )
    151183
    152   #define RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( name, obj_name ) \
     184  #define RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( name, obj_name ) \
    153185    { \
    154186      &SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
     
    159191      ( obj_name ) \
    160192    }
     193
     194  /* Provided for backward compatibility */
     195
     196  #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( name, prio_count ) \
     197    RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( name, prio_count )
     198
     199  #define RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( name, obj_name ) \
     200    RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( name, obj_name )
    161201#endif
    162202
     
    167207    SCHEDULER_CONTEXT_NAME( priority_SMP_ ## name )
    168208
    169   #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( name, prio_count ) \
     209  #define RTEMS_SCHEDULER_PRIORITY_SMP( name, prio_count ) \
    170210    static struct { \
    171211      Scheduler_priority_SMP_Context Base; \
     
    173213    } SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name )
    174214
    175   #define RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( name, obj_name ) \
     215  #define RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( name, obj_name ) \
    176216    { \
    177217      &SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
     
    182222      ( obj_name ) \
    183223    }
     224
     225  /* Provided for backward compatibility */
     226
     227  #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( name, prio_count ) \
     228    RTEMS_SCHEDULER_PRIORITY_SMP( name, prio_count )
     229
     230  #define RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( name, obj_name ) \
     231    RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( name, obj_name )
    184232#endif
    185233
     
    190238    SCHEDULER_CONTEXT_NAME( strong_APA_ ## name )
    191239
    192   #define RTEMS_SCHEDULER_CONTEXT_STRONG_APA( name, prio_count ) \
     240  #define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
    193241    static struct { \
    194242      Scheduler_strong_APA_Context Base; \
     
    196244    } SCHEDULER_STRONG_APA_CONTEXT_NAME( name )
    197245
    198   #define RTEMS_SCHEDULER_CONTROL_STRONG_APA( name, obj_name ) \
     246  #define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
    199247    { \
    200248      &SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
     
    205253      ( obj_name ) \
    206254    }
     255
     256  /* Provided for backward compatibility */
     257
     258  #define RTEMS_SCHEDULER_CONTEXT_STRONG_APA( name, prio_count ) \
     259    RTEMS_SCHEDULER_STRONG_APA( name, prio_count )
     260
     261  #define RTEMS_SCHEDULER_CONTROL_STRONG_APA( name, obj_name ) \
     262    RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name )
    207263#endif
    208264
     
    213269    SCHEDULER_CONTEXT_NAME( simple_ ## name )
    214270
    215   #define RTEMS_SCHEDULER_CONTEXT_SIMPLE( name ) \
     271  #define RTEMS_SCHEDULER_SIMPLE( name ) \
    216272    static Scheduler_simple_Context \
    217273      SCHEDULER_SIMPLE_CONTEXT_NAME( name )
    218274
    219   #define RTEMS_SCHEDULER_CONTROL_SIMPLE( name, obj_name ) \
     275  #define RTEMS_SCHEDULER_TABLE_SIMPLE( name, obj_name ) \
    220276    { \
    221277      &SCHEDULER_SIMPLE_CONTEXT_NAME( name ).Base, \
     
    224280      ( obj_name ) \
    225281    }
     282
     283  /* Provided for backward compatibility */
     284
     285  #define RTEMS_SCHEDULER_CONTEXT_SIMPLE( name ) \
     286    RTEMS_SCHEDULER_SIMPLE( name )
     287
     288  #define RTEMS_SCHEDULER_CONTROL_SIMPLE( name, obj_name ) \
     289    RTEMS_SCHEDULER_TABLE_SIMPLE( name, obj_name )
    226290#endif
    227291
     
    232296    SCHEDULER_CONTEXT_NAME( simple_SMP_ ## name )
    233297
    234   #define RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP( name ) \
     298  #define RTEMS_SCHEDULER_SIMPLE_SMP( name ) \
    235299    static Scheduler_simple_SMP_Context \
    236300      SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name )
    237301
    238   #define RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP( name, obj_name ) \
     302  #define RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( name, obj_name ) \
    239303    { \
    240304      &SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ).Base.Base, \
     
    243307      ( obj_name ) \
    244308    }
     309
     310  /* Provided for backward compatibility */
     311
     312  #define RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP( name ) \
     313    RTEMS_SCHEDULER_SIMPLE_SMP( name )
     314
     315  #define RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP( name, obj_name ) \
     316    RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( name, obj_name )
    245317#endif
    246318
Note: See TracChangeset for help on using the changeset viewer.