[PATCH] rtems: Document scheduler configuration API

Gedare Bloom gedare at rtems.org
Fri Feb 10 14:57:35 UTC 2023


the 4 doxygen patches look fine to me.

On Fri, Feb 10, 2023 at 7:56 AM Gedare Bloom <gedare at rtems.org> wrote:
>
> ok, thanks
>
> On Fri, Feb 10, 2023 at 7:20 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> >
> > Move the scheduler configuration macros out of the #ifdef
> > CONFIGURE_SCHEDULER_* scope so that Doxygen can see them and generate
> > the corresponding documentation entries.
> > ---
> >  cpukit/include/rtems/scheduler.h | 569 ++++++++++++++++++++++---------
> >  1 file changed, 407 insertions(+), 162 deletions(-)
> >
> > diff --git a/cpukit/include/rtems/scheduler.h b/cpukit/include/rtems/scheduler.h
> > index 2adb42adc2..daf949fb48 100644
> > --- a/cpukit/include/rtems/scheduler.h
> > +++ b/cpukit/include/rtems/scheduler.h
> > @@ -54,6 +54,8 @@
> >    extern const Scheduler_Control RTEMS_SCHEDULER_INVALID_INDEX;
> >
> >    /**
> > +   * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > +   *
> >     * @brief This define indicates that default attributes shall be used for a
> >     *   processor to scheduler assignment.
> >     *
> > @@ -64,11 +66,13 @@
> >      SCHEDULER_ASSIGN_DEFAULT
> >
> >    /**
> > +   * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > +   *
> >     * @brief This define indicates that the processor is optionally assigned to
> >     *   the scheduler.
> >     *
> > -   * If the processor is not present during system initialization, then no
> > -   * fatal error will occur.
> > +   * If the processor is not present during system initialization, then the
> > +   * system initialization continues and the processor is marked as not online.
> >     *
> >     * This define may be used as an attribute parameter value in the
> >     * RTEMS_SCHEDULER_ASSIGN() macro.
> > @@ -77,12 +81,14 @@
> >      SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL
> >
> >    /**
> > +   * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > +   *
> >     * @brief This define indicates that the processor to scheduler assignment is
> >     *   mandatory.
> >     *
> >     * If the processor is not present during system initialization, then the
> > -   * fatal error with source ::RTEMS_FATAL_SOURCE_SMP and code
> > -   * ::SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT will occur.
> > +   * system terminates with the fatal source of ::RTEMS_FATAL_SOURCE_SMP and
> > +   * fatal code of ::SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT.
> >     *
> >     * This define may be used as an attribute parameter value in the
> >     * RTEMS_SCHEDULER_ASSIGN() macro.
> > @@ -91,6 +97,8 @@
> >      SCHEDULER_ASSIGN_PROCESSOR_MANDATORY
> >
> >    /**
> > +   * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > +   *
> >     * @brief Defines a processor to scheduler assignment.
> >     *
> >     * This macro may be used to define entries of the scheduler assignment
> > @@ -108,6 +116,8 @@
> >      }
> >
> >    /**
> > +   * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > +   *
> >     * @brief Defines that no scheduler is assigned to the processor.
> >     *
> >     * This processor cannot be used by the application.
> > @@ -126,23 +136,48 @@
> >   * information.
> >   */
> >
> > -#ifdef CONFIGURE_SCHEDULER_CBS
> > -  #include <rtems/score/schedulercbs.h>
> > +/**
> > + * @brief Defines a CBS Scheduler context name based on the instantiation
> > + *   name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_CBS_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( CBS_ ## name )
> >
> > -  #define SCHEDULER_CBS_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( CBS_ ## name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a CBS Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_CBS( name ) \
> > +  static Scheduler_EDF_Context SCHEDULER_CBS_CONTEXT_NAME( name )
> >
> > -  #define RTEMS_SCHEDULER_CBS( name ) \
> > -    static Scheduler_EDF_Context SCHEDULER_CBS_CONTEXT_NAME( name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a CBS Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_CBS( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_CBS_CONTEXT_NAME( name ).Base, \
> > +    SCHEDULER_CBS_ENTRY_POINTS, \
> > +    SCHEDULER_CBS_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > +  }
> >
> > -  #define RTEMS_SCHEDULER_TABLE_CBS( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_CBS_CONTEXT_NAME( name ).Base, \
> > -      SCHEDULER_CBS_ENTRY_POINTS, \
> > -      SCHEDULER_CBS_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > -    }
> > +#ifdef CONFIGURE_SCHEDULER_CBS
> > +  #include <rtems/score/schedulercbs.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -153,23 +188,48 @@
> >      RTEMS_SCHEDULER_TABLE_CBS( name, obj_name )
> >  #endif
> >
> > -#ifdef CONFIGURE_SCHEDULER_EDF
> > -  #include <rtems/score/scheduleredf.h>
> > +/**
> > + * @brief Defines an EDF Scheduler context name based on the instantiation
> > + *   name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_EDF_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( EDF_ ## name )
> >
> > -  #define SCHEDULER_EDF_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( EDF_ ## name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines an EDF Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_EDF( name ) \
> > +  static Scheduler_EDF_Context SCHEDULER_EDF_CONTEXT_NAME( name )
> >
> > -  #define RTEMS_SCHEDULER_EDF( name ) \
> > -    static Scheduler_EDF_Context SCHEDULER_EDF_CONTEXT_NAME( name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines an EDF Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_EDF( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_EDF_CONTEXT_NAME( name ).Base, \
> > +    SCHEDULER_EDF_ENTRY_POINTS, \
> > +    SCHEDULER_EDF_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > +  }
> >
> > -  #define RTEMS_SCHEDULER_TABLE_EDF( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_EDF_CONTEXT_NAME( name ).Base, \
> > -      SCHEDULER_EDF_ENTRY_POINTS, \
> > -      SCHEDULER_EDF_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > -    }
> > +#ifdef CONFIGURE_SCHEDULER_EDF
> > +  #include <rtems/score/scheduleredf.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -180,34 +240,59 @@
> >      RTEMS_SCHEDULER_TABLE_EDF( name, obj_name )
> >  #endif
> >
> > +/**
> > + * @brief Defines an EDF SMP Scheduler context name based on the instantiation
> > + *   name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_EDF_SMP_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( EDF_SMP_ ## name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines an EDF SMP Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_EDF_SMP( name ) \
> > +  static struct { \
> > +    Scheduler_EDF_SMP_Context Base; \
> > +    Scheduler_EDF_SMP_Ready_queue Ready[ CONFIGURE_MAXIMUM_PROCESSORS + 1 ]; \
> > +  } SCHEDULER_EDF_SMP_CONTEXT_NAME( name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines an EDF SMP Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_EDF_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > +    SCHEDULER_EDF_SMP_ENTRY_POINTS, \
> > +    SCHEDULER_EDF_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > +  }
> > +
> >  #ifdef CONFIGURE_SCHEDULER_EDF_SMP
> >    #ifndef RTEMS_SMP
> >      #error "CONFIGURE_SCHEDULER_EDF_SMP cannot be used if RTEMS_SMP is disabled"
> >    #endif
> >
> > -  #include <rtems/score/scheduleredfsmp.h>
> > -
> >    #ifndef CONFIGURE_MAXIMUM_PROCESSORS
> > -    #error "CONFIGURE_MAXIMUM_PROCESSORS must be defined to configure the EDF SMP scheduler"
> > +    #error "CONFIGURE_MAXIMUM_PROCESSORS must be defined to configure the EDF SMP Scheduler"
> >    #endif
> >
> > -  #define SCHEDULER_EDF_SMP_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( EDF_SMP_ ## name )
> > -
> > -  #define RTEMS_SCHEDULER_EDF_SMP( name ) \
> > -    static struct { \
> > -      Scheduler_EDF_SMP_Context Base; \
> > -      Scheduler_EDF_SMP_Ready_queue Ready[ CONFIGURE_MAXIMUM_PROCESSORS + 1 ]; \
> > -    } SCHEDULER_EDF_SMP_CONTEXT_NAME( name )
> > -
> > -  #define RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_EDF_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > -      SCHEDULER_EDF_SMP_ENTRY_POINTS, \
> > -      SCHEDULER_EDF_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > -    }
> > +  #include <rtems/score/scheduleredfsmp.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -218,28 +303,56 @@
> >      RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name )
> >  #endif
> >
> > -#ifdef CONFIGURE_SCHEDULER_PRIORITY
> > -  #include <rtems/score/schedulerpriority.h>
> > +/**
> > + * @brief Defines a Deterministic Priority Scheduler context name based on the
> > + *   instantiation name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_PRIORITY_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( priority_ ## name )
> >
> > -  #define SCHEDULER_PRIORITY_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( priority_ ## name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Deterministic Priority Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param prio_count is the count of supported priority levels.
> > + */
> > +#define RTEMS_SCHEDULER_PRIORITY( name, prio_count ) \
> > +  static struct { \
> > +    Scheduler_priority_Context Base; \
> > +    Chain_Control              Ready[ ( prio_count ) ]; \
> > +  } SCHEDULER_PRIORITY_CONTEXT_NAME( name )
> >
> > -  #define RTEMS_SCHEDULER_PRIORITY( name, prio_count ) \
> > -    static struct { \
> > -      Scheduler_priority_Context Base; \
> > -      Chain_Control              Ready[ ( prio_count ) ]; \
> > -    } SCHEDULER_PRIORITY_CONTEXT_NAME( name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Deterministic Priority Scheduler entry for the scheduler
> > + *   table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_PRIORITY( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_PRIORITY_CONTEXT_NAME( name ).Base.Base, \
> > +    SCHEDULER_PRIORITY_ENTRY_POINTS, \
> > +    RTEMS_ARRAY_SIZE( \
> > +      SCHEDULER_PRIORITY_CONTEXT_NAME( name ).Ready \
> > +    ) - 1, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > +  }
> >
> > -  #define RTEMS_SCHEDULER_TABLE_PRIORITY( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_PRIORITY_CONTEXT_NAME( name ).Base.Base, \
> > -      SCHEDULER_PRIORITY_ENTRY_POINTS, \
> > -      RTEMS_ARRAY_SIZE( \
> > -        SCHEDULER_PRIORITY_CONTEXT_NAME( name ).Ready \
> > -      ) - 1, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > -    }
> > +#ifdef CONFIGURE_SCHEDULER_PRIORITY
> > +  #include <rtems/score/schedulerpriority.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -250,6 +363,55 @@
> >      RTEMS_SCHEDULER_TABLE_PRIORITY( name, obj_name )
> >  #endif
> >
> > +/**
> > + * @brief Defines a Arbitrary Processor Affinity Priority SMP Scheduler context
> > + *   name based on the instantiation name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( priority_affinity_SMP_ ## name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Arbitrary Processor Affinity Priority SMP Scheduler
> > + *   instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param prio_count is the count of supported priority levels.
> > + */
> > +#define RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( name, prio_count ) \
> > +  static struct { \
> > +    Scheduler_priority_SMP_Context Base; \
> > +    Chain_Control                  Ready[ ( prio_count ) ]; \
> > +  } SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Arbitrary Processor Affinity Priority SMP Scheduler entry
> > + *   for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > +    SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS, \
> > +    RTEMS_ARRAY_SIZE( \
> > +      SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ).Ready \
> > +    ) - 1, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > +  }
> > +
> >  #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
> >    #ifndef RTEMS_SMP
> >      #error "CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP cannot be used if RTEMS_SMP is disabled"
> > @@ -257,26 +419,6 @@
> >
> >    #include <rtems/score/schedulerpriorityaffinitysmp.h>
> >
> > -  #define SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( priority_affinity_SMP_ ## name )
> > -
> > -  #define RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( name, prio_count ) \
> > -    static struct { \
> > -      Scheduler_priority_SMP_Context Base; \
> > -      Chain_Control                  Ready[ ( prio_count ) ]; \
> > -    } SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name )
> > -
> > -  #define RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > -      SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS, \
> > -      RTEMS_ARRAY_SIZE( \
> > -        SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ).Ready \
> > -      ) - 1, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > -    }
> > -
> >    /* Provided for backward compatibility */
> >
> >    #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( name, prio_count ) \
> > @@ -286,6 +428,54 @@
> >      RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( name, obj_name )
> >  #endif
> >
> > +/**
> > + * @brief Defines a Deterministic Priority SMP Scheduler context name based on
> > + *   the instantiation name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( priority_SMP_ ## name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Deterministic Priority SMP Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param prio_count is the count of supported priority levels.
> > + */
> > +#define RTEMS_SCHEDULER_PRIORITY_SMP( name, prio_count ) \
> > +  static struct { \
> > +    Scheduler_priority_SMP_Context Base; \
> > +    Chain_Control                  Ready[ ( prio_count ) ]; \
> > +  } SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Deterministic Priority SMP Scheduler entry for the
> > + *   scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > +    SCHEDULER_PRIORITY_SMP_ENTRY_POINTS, \
> > +    RTEMS_ARRAY_SIZE( \
> > +      SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ).Ready \
> > +    ) - 1, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > +  }
> > +
> >  #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP
> >    #ifndef RTEMS_SMP
> >      #error "CONFIGURE_SCHEDULER_PRIORITY_SMP cannot be used if RTEMS_SMP is disabled"
> > @@ -293,26 +483,6 @@
> >
> >    #include <rtems/score/schedulerprioritysmp.h>
> >
> > -  #define SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( priority_SMP_ ## name )
> > -
> > -  #define RTEMS_SCHEDULER_PRIORITY_SMP( name, prio_count ) \
> > -    static struct { \
> > -      Scheduler_priority_SMP_Context Base; \
> > -      Chain_Control                  Ready[ ( prio_count ) ]; \
> > -    } SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name )
> > -
> > -  #define RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ).Base.Base.Base, \
> > -      SCHEDULER_PRIORITY_SMP_ENTRY_POINTS, \
> > -      RTEMS_ARRAY_SIZE( \
> > -        SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ).Ready \
> > -      ) - 1, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > -    }
> > -
> >    /* Provided for backward compatibility */
> >
> >    #define RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( name, prio_count ) \
> > @@ -322,34 +492,59 @@
> >      RTEMS_SCHEDULER_TABLE_PRIORITY_SMP( name, obj_name )
> >  #endif
> >
> > +/**
> > + * @brief Defines a Strong APA Scheduler context name based on the
> > + *   instantiation name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_STRONG_APA_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( strong_APA_ ## name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Strong APA Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
> > +  static struct { \
> > +    Scheduler_strong_APA_Context Base; \
> > +    Scheduler_strong_APA_CPU CPU[ CONFIGURE_MAXIMUM_PROCESSORS ]; \
> > +  } SCHEDULER_STRONG_APA_CONTEXT_NAME( name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Strong APA Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
> > +    SCHEDULER_STRONG_APA_ENTRY_POINTS, \
> > +    SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > +  }
> > +
> >  #ifdef CONFIGURE_SCHEDULER_STRONG_APA
> >    #ifndef RTEMS_SMP
> >      #error "CONFIGURE_SCHEDULER_STRONG_APA cannot be used if RTEMS_SMP is disabled"
> >    #endif
> >
> > -  #include <rtems/score/schedulerstrongapa.h>
> > -
> >    #ifndef CONFIGURE_MAXIMUM_PROCESSORS
> > -    #error "CONFIGURE_MAXIMUM_PROCESSORS must be defined to configure the Strong APA scheduler"
> > +    #error "CONFIGURE_MAXIMUM_PROCESSORS must be defined to configure the Strong APA Scheduler"
> >    #endif
> >
> > -  #define SCHEDULER_STRONG_APA_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( strong_APA_ ## name )
> > -
> > -  #define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
> > -    static struct { \
> > -      Scheduler_strong_APA_Context Base; \
> > -      Scheduler_strong_APA_CPU CPU[ CONFIGURE_MAXIMUM_PROCESSORS ]; \
> > -    } SCHEDULER_STRONG_APA_CONTEXT_NAME( name )
> > -
> > -  #define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
> > -      SCHEDULER_STRONG_APA_ENTRY_POINTS, \
> > -      SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > -    }
> > +  #include <rtems/score/schedulerstrongapa.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -360,24 +555,49 @@
> >      RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name )
> >  #endif
> >
> > -#ifdef CONFIGURE_SCHEDULER_SIMPLE
> > -  #include <rtems/score/schedulersimple.h>
> > +/**
> > + * @brief Defines a Simple Scheduler context name based on the instantiation
> > + *   name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_SIMPLE_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( simple_ ## name )
> >
> > -  #define SCHEDULER_SIMPLE_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( simple_ ## name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Simple Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_SIMPLE( name ) \
> > +  static Scheduler_simple_Context \
> > +    SCHEDULER_SIMPLE_CONTEXT_NAME( name )
> >
> > -  #define RTEMS_SCHEDULER_SIMPLE( name ) \
> > -    static Scheduler_simple_Context \
> > -      SCHEDULER_SIMPLE_CONTEXT_NAME( name )
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Simple Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_SIMPLE( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_SIMPLE_CONTEXT_NAME( name ).Base, \
> > +    SCHEDULER_SIMPLE_ENTRY_POINTS, \
> > +    SCHEDULER_SIMPLE_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > +  }
> >
> > -  #define RTEMS_SCHEDULER_TABLE_SIMPLE( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_SIMPLE_CONTEXT_NAME( name ).Base, \
> > -      SCHEDULER_SIMPLE_ENTRY_POINTS, \
> > -      SCHEDULER_SIMPLE_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
> > -    }
> > +#ifdef CONFIGURE_SCHEDULER_SIMPLE
> > +  #include <rtems/score/schedulersimple.h>
> >
> >    /* Provided for backward compatibility */
> >
> > @@ -388,6 +608,47 @@
> >      RTEMS_SCHEDULER_TABLE_SIMPLE( name, obj_name )
> >  #endif
> >
> > +/**
> > + * @brief Defines a Simple SMP Scheduler context name based on the
> > + *   instantiation name.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ) \
> > +  SCHEDULER_CONTEXT_NAME( simple_SMP_ ## name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Simple SMP Scheduler instantiation.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + */
> > +#define RTEMS_SCHEDULER_SIMPLE_SMP( name ) \
> > +  static Scheduler_simple_SMP_Context \
> > +    SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name )
> > +
> > +/**
> > + * @ingroup RTEMSApplConfigGeneralSchedulerConfiguration
> > + *
> > + * @brief Defines a Simple SMP Scheduler entry for the scheduler table.
> > + *
> > + * Use this macro to define an entry for the
> > + * @ref CONFIGURE_SCHEDULER_TABLE_ENTRIES application configuration option.
> > + *
> > + * @param name is the scheduler instantiation name.
> > + *
> > + * @param name is the scheduler object name.
> > + */
> > +#define RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( name, obj_name ) \
> > +  { \
> > +    &SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ).Base.Base, \
> > +    SCHEDULER_SIMPLE_SMP_ENTRY_POINTS, \
> > +    SCHEDULER_SIMPLE_SMP_MAXIMUM_PRIORITY, \
> > +    ( obj_name ) \
> > +    SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > +  }
> > +
> >  #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP
> >    #ifndef RTEMS_SMP
> >      #error "CONFIGURE_SCHEDULER_SIMPLE_SMP cannot be used if RTEMS_SMP is disabled"
> > @@ -395,22 +656,6 @@
> >
> >    #include <rtems/score/schedulersimplesmp.h>
> >
> > -  #define SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ) \
> > -    SCHEDULER_CONTEXT_NAME( simple_SMP_ ## name )
> > -
> > -  #define RTEMS_SCHEDULER_SIMPLE_SMP( name ) \
> > -    static Scheduler_simple_SMP_Context \
> > -      SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name )
> > -
> > -  #define RTEMS_SCHEDULER_TABLE_SIMPLE_SMP( name, obj_name ) \
> > -    { \
> > -      &SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ).Base.Base, \
> > -      SCHEDULER_SIMPLE_SMP_ENTRY_POINTS, \
> > -      SCHEDULER_SIMPLE_SMP_MAXIMUM_PRIORITY, \
> > -      ( obj_name ) \
> > -      SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> > -    }
> > -
> >    /* Provided for backward compatibility */
> >
> >    #define RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP( name ) \
> > --
> > 2.35.3
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list