Changeset 2ef85b1 in rtems for cpukit/include/rtems/confdefs.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/confdefs.h

    r4dfeba3 r2ef85b1  
    710710 * CONFIGURE_SCHEDULER_USER and the following:
    711711 *
    712  *    - CONFIGURE_SCHEDULER_CONTEXT
    713  *    - CONFIGURE_SCHEDULER_CONTROLS
     712 *    - CONFIGURE_SCHEDULER
     713 *    - CONFIGURE_SCHEDULER_TABLE_ENTRIES
    714714 *    - CONFIGURE_SCHEDULER_USER_PER_THREAD
    715715 */
     716
     717#ifdef CONFIGURE_SCHEDULER_CONTEXT
     718  #warning "CONFIGURE_SCHEDULER_CONTEXT has been renamed to CONFIGURE_SCHEDULER since RTEMS 5.1"
     719  #define CONFIGURE_SCHEDULER CONFIGURE_SCHEDULER_CONTEXT
     720#endif
     721
     722#ifdef CONFIGURE_SCHEDULER_CONTROLS
     723  #warning "CONFIGURE_SCHEDULER_CONTROLS has been renamed to CONFIGURE_SCHEDULER_TABLE_ENTRIES since RTEMS 5.1"
     724  #define CONFIGURE_SCHEDULER_TABLE_ENTRIES CONFIGURE_SCHEDULER_CONTROLS
     725#endif
     726
     727#ifdef CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS
     728  #warning "CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS has been renamed to CONFIGURE_SCHEDULER_ASSIGNMENTS since RTEMS 5.1"
     729  #define CONFIGURE_SCHEDULER_ASSIGNMENTS CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS
     730#endif
    716731
    717732#if !defined(CONFIGURE_SCHEDULER_USER) && \
     
    751766  #endif
    752767
    753   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     768  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    754769    /** Configure the context needed by the scheduler instance */
    755     #define CONFIGURE_SCHEDULER_CONTEXT \
     770    #define CONFIGURE_SCHEDULER \
    756771      RTEMS_SCHEDULER_CONTEXT_PRIORITY( \
    757772        dflt, \
     
    760775
    761776    /** Configure the controls for this scheduler instance */
    762     #define CONFIGURE_SCHEDULER_CONTROLS \
     777    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    763778      RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME)
    764779  #endif
     
    775790  #endif
    776791
    777   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     792  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    778793    /** Configure the context needed by the scheduler instance */
    779     #define CONFIGURE_SCHEDULER_CONTEXT \
     794    #define CONFIGURE_SCHEDULER \
    780795      RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( \
    781796        dflt, \
     
    784799
    785800    /** Configure the controls for this scheduler instance */
    786     #define CONFIGURE_SCHEDULER_CONTROLS \
     801    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    787802      RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
    788803  #endif
     
    799814  #endif
    800815
    801   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     816  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    802817    /** Configure the context needed by the scheduler instance */
    803     #define CONFIGURE_SCHEDULER_CONTEXT \
     818    #define CONFIGURE_SCHEDULER \
    804819      RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( \
    805820        dflt, \
     
    808823
    809824    /** Configure the controls for this scheduler instance */
    810     #define CONFIGURE_SCHEDULER_CONTROLS \
     825    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    811826      RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( \
    812827        dflt, \
     
    826841  #endif
    827842
    828   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     843  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    829844    /** Configure the context needed by the scheduler instance */
    830     #define CONFIGURE_SCHEDULER_CONTEXT \
     845    #define CONFIGURE_SCHEDULER \
    831846      RTEMS_SCHEDULER_CONTEXT_STRONG_APA( \
    832847        dflt, \
     
    835850
    836851    /** Configure the controls for this scheduler instance */
    837     #define CONFIGURE_SCHEDULER_CONTROLS \
     852    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    838853      RTEMS_SCHEDULER_CONTROL_STRONG_APA(dflt, CONFIGURE_SCHEDULER_NAME)
    839854  #endif
     
    849864  #endif
    850865
    851   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     866  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    852867    /** Configure the context needed by the scheduler instance */
    853     #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_SIMPLE(dflt)
     868    #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CONTEXT_SIMPLE(dflt)
    854869
    855870    /** Configure the controls for this scheduler instance */
    856     #define CONFIGURE_SCHEDULER_CONTROLS \
     871    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    857872      RTEMS_SCHEDULER_CONTROL_SIMPLE(dflt, CONFIGURE_SCHEDULER_NAME)
    858873  #endif
     
    868883  #endif
    869884
    870   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     885  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    871886    /** Configure the context needed by the scheduler instance */
    872     #define CONFIGURE_SCHEDULER_CONTEXT \
     887    #define CONFIGURE_SCHEDULER \
    873888      RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(dflt)
    874889
    875890    /** Configure the controls for this scheduler instance */
    876     #define CONFIGURE_SCHEDULER_CONTROLS \
     891    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    877892      RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
    878893  #endif
     
    888903  #endif
    889904
    890   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     905  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    891906    /** Configure the context needed by the scheduler instance */
    892     #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_EDF(dflt)
     907    #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CONTEXT_EDF(dflt)
    893908
    894909    /** Configure the controls for this scheduler instance */
    895     #define CONFIGURE_SCHEDULER_CONTROLS \
     910    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    896911      RTEMS_SCHEDULER_CONTROL_EDF(dflt, CONFIGURE_SCHEDULER_NAME)
    897912  #endif
     
    907922  #endif
    908923
    909   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     924  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    910925    /** Configure the context needed by the scheduler instance */
    911     #define CONFIGURE_SCHEDULER_CONTEXT \
     926    #define CONFIGURE_SCHEDULER \
    912927      RTEMS_SCHEDULER_CONTEXT_EDF_SMP(dflt, CONFIGURE_MAXIMUM_PROCESSORS)
    913928
    914929    /** Configure the controls for this scheduler instance */
    915     #define CONFIGURE_SCHEDULER_CONTROLS \
     930    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    916931      RTEMS_SCHEDULER_CONTROL_EDF_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
    917932  #endif
     
    927942  #endif
    928943
    929   #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     944  #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES)
    930945    /** Configure the context needed by the scheduler instance */
    931     #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_CBS(dflt)
     946    #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CONTEXT_CBS(dflt)
    932947
    933948    /** Configure the controls for this scheduler instance */
    934     #define CONFIGURE_SCHEDULER_CONTROLS \
     949    #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
    935950      RTEMS_SCHEDULER_CONTROL_CBS(dflt, CONFIGURE_SCHEDULER_NAME)
    936951  #endif
     
    954969 */
    955970#ifdef CONFIGURE_INIT
    956   #if defined(CONFIGURE_SCHEDULER_CONTEXT)
    957     CONFIGURE_SCHEDULER_CONTEXT;
     971  #if defined(CONFIGURE_SCHEDULER)
     972    CONFIGURE_SCHEDULER;
    958973  #endif
    959974
    960975  const Scheduler_Control _Scheduler_Table[] = {
    961     CONFIGURE_SCHEDULER_CONTROLS
     976    CONFIGURE_SCHEDULER_TABLE_ENTRIES
    962977  };
    963978
     
    968983
    969984    const Scheduler_Assignment _Scheduler_Initial_assignments[] = {
    970       #if defined(CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS)
    971         CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS
     985      #if defined(CONFIGURE_SCHEDULER_ASSIGNMENTS)
     986        CONFIGURE_SCHEDULER_ASSIGNMENTS
    972987      #else
    973         #define _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT \
     988        #define _CONFIGURE_SCHEDULER_ASSIGN \
    974989          RTEMS_SCHEDULER_ASSIGN( \
    975990            0, \
    976991            RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
    977992          )
    978         _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     993        _CONFIGURE_SCHEDULER_ASSIGN
    979994        #if CONFIGURE_MAXIMUM_PROCESSORS >= 2
    980           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     995          , _CONFIGURE_SCHEDULER_ASSIGN
    981996        #endif
    982997        #if CONFIGURE_MAXIMUM_PROCESSORS >= 3
    983           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     998          , _CONFIGURE_SCHEDULER_ASSIGN
    984999        #endif
    9851000        #if CONFIGURE_MAXIMUM_PROCESSORS >= 4
    986           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1001          , _CONFIGURE_SCHEDULER_ASSIGN
    9871002        #endif
    9881003        #if CONFIGURE_MAXIMUM_PROCESSORS >= 5
    989           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1004          , _CONFIGURE_SCHEDULER_ASSIGN
    9901005        #endif
    9911006        #if CONFIGURE_MAXIMUM_PROCESSORS >= 6
    992           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1007          , _CONFIGURE_SCHEDULER_ASSIGN
    9931008        #endif
    9941009        #if CONFIGURE_MAXIMUM_PROCESSORS >= 7
    995           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1010          , _CONFIGURE_SCHEDULER_ASSIGN
    9961011        #endif
    9971012        #if CONFIGURE_MAXIMUM_PROCESSORS >= 8
    998           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1013          , _CONFIGURE_SCHEDULER_ASSIGN
    9991014        #endif
    10001015        #if CONFIGURE_MAXIMUM_PROCESSORS >= 9
    1001           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1016          , _CONFIGURE_SCHEDULER_ASSIGN
    10021017        #endif
    10031018        #if CONFIGURE_MAXIMUM_PROCESSORS >= 10
    1004           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1019          , _CONFIGURE_SCHEDULER_ASSIGN
    10051020        #endif
    10061021        #if CONFIGURE_MAXIMUM_PROCESSORS >= 11
    1007           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1022          , _CONFIGURE_SCHEDULER_ASSIGN
    10081023        #endif
    10091024        #if CONFIGURE_MAXIMUM_PROCESSORS >= 12
    1010           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1025          , _CONFIGURE_SCHEDULER_ASSIGN
    10111026        #endif
    10121027        #if CONFIGURE_MAXIMUM_PROCESSORS >= 13
    1013           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1028          , _CONFIGURE_SCHEDULER_ASSIGN
    10141029        #endif
    10151030        #if CONFIGURE_MAXIMUM_PROCESSORS >= 14
    1016           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1031          , _CONFIGURE_SCHEDULER_ASSIGN
    10171032        #endif
    10181033        #if CONFIGURE_MAXIMUM_PROCESSORS >= 15
    1019           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1034          , _CONFIGURE_SCHEDULER_ASSIGN
    10201035        #endif
    10211036        #if CONFIGURE_MAXIMUM_PROCESSORS >= 16
    1022           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1037          , _CONFIGURE_SCHEDULER_ASSIGN
    10231038        #endif
    10241039        #if CONFIGURE_MAXIMUM_PROCESSORS >= 17
    1025           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1040          , _CONFIGURE_SCHEDULER_ASSIGN
    10261041        #endif
    10271042        #if CONFIGURE_MAXIMUM_PROCESSORS >= 18
    1028           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1043          , _CONFIGURE_SCHEDULER_ASSIGN
    10291044        #endif
    10301045        #if CONFIGURE_MAXIMUM_PROCESSORS >= 19
    1031           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1046          , _CONFIGURE_SCHEDULER_ASSIGN
    10321047        #endif
    10331048        #if CONFIGURE_MAXIMUM_PROCESSORS >= 20
    1034           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1049          , _CONFIGURE_SCHEDULER_ASSIGN
    10351050        #endif
    10361051        #if CONFIGURE_MAXIMUM_PROCESSORS >= 21
    1037           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1052          , _CONFIGURE_SCHEDULER_ASSIGN
    10381053        #endif
    10391054        #if CONFIGURE_MAXIMUM_PROCESSORS >= 22
    1040           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1055          , _CONFIGURE_SCHEDULER_ASSIGN
    10411056        #endif
    10421057        #if CONFIGURE_MAXIMUM_PROCESSORS >= 23
    1043           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1058          , _CONFIGURE_SCHEDULER_ASSIGN
    10441059        #endif
    10451060        #if CONFIGURE_MAXIMUM_PROCESSORS >= 24
    1046           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1061          , _CONFIGURE_SCHEDULER_ASSIGN
    10471062        #endif
    10481063        #if CONFIGURE_MAXIMUM_PROCESSORS >= 25
    1049           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1064          , _CONFIGURE_SCHEDULER_ASSIGN
    10501065        #endif
    10511066        #if CONFIGURE_MAXIMUM_PROCESSORS >= 26
    1052           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1067          , _CONFIGURE_SCHEDULER_ASSIGN
    10531068        #endif
    10541069        #if CONFIGURE_MAXIMUM_PROCESSORS >= 27
    1055           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1070          , _CONFIGURE_SCHEDULER_ASSIGN
    10561071        #endif
    10571072        #if CONFIGURE_MAXIMUM_PROCESSORS >= 28
    1058           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1073          , _CONFIGURE_SCHEDULER_ASSIGN
    10591074        #endif
    10601075        #if CONFIGURE_MAXIMUM_PROCESSORS >= 29
    1061           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1076          , _CONFIGURE_SCHEDULER_ASSIGN
    10621077        #endif
    10631078        #if CONFIGURE_MAXIMUM_PROCESSORS >= 30
    1064           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1079          , _CONFIGURE_SCHEDULER_ASSIGN
    10651080        #endif
    10661081        #if CONFIGURE_MAXIMUM_PROCESSORS >= 31
    1067           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1082          , _CONFIGURE_SCHEDULER_ASSIGN
    10681083        #endif
    10691084        #if CONFIGURE_MAXIMUM_PROCESSORS >= 32
    1070           , _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
    1071         #endif
    1072         #undef _CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     1085          , _CONFIGURE_SCHEDULER_ASSIGN
     1086        #endif
     1087        #undef _CONFIGURE_SCHEDULER_ASSIGN
    10731088      #endif
    10741089    };
Note: See TracChangeset for help on using the changeset viewer.