Need help understand how the scheduler table entries work

Richi Dubey richidubey at gmail.com
Tue Aug 11 15:02:25 UTC 2020


Thanks for the reply. Yes, I got it from your previous mail(
https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/scheduler.h#n286
).

On Tue, Aug 11, 2020 at 6:39 PM Gedare Bloom <gedare at rtems.org> wrote:

> On Tue, Aug 11, 2020 at 12:42 AM Richi Dubey <richidubey at gmail.com> wrote:
> >
> > This really helped. Thank you.
> >
> >> There is not really anything to change about it. You specialize the
> >> scheduler by the Scheduler_Context and Scheduler_Operations
> >> structures. You still just pass through the context base to the
> >> scheduler table.
> >
> > I understand. The Ready queue per priority that was used earlier (link)
> has to be removed. Hence the question.
> >
> Hopefully, you have got to know that is just to find the maximum
> priority in setting up the table entry.
>
> > Thank you.
> >
> > On Mon, Aug 10, 2020 at 9:04 PM Gedare Bloom <gedare at rtems.org> wrote:
> >>
> >> On Mon, Aug 10, 2020 at 9:10 AM Richi Dubey <richidubey at gmail.com>
> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I want your help to figure out how the table entries for a scheduler
> work.
> >> >
> >> > For STRONG_APA scheduler, the flow is :
> >> > link
> >> >
> -------------------------------------------------------------------------------------------------------
> >> >   #define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
> >> >     { \
> >> >       &SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
> >> >       SCHEDULER_STRONG_APA_ENTRY_POINTS, \
> >> >       RTEMS_ARRAY_SIZE( \
> >> >         SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Ready \
> >> >       ) - 1, \
> >> >       ( obj_name ) \
> >> >       SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
> >> >     }
> >> >
> >> >
> -------------------------------------------------------------------------------------------------------
> >> > which is used for:
> >> > link
> >> >
> -------------------------------------------------------------------------------------------------------
> >> >
> >> > #ifdef CONFIGURE_SCHEDULER_STRONG_APA
> >> >   #ifndef CONFIGURE_SCHEDULER_NAME
> >> >     #define CONFIGURE_SCHEDULER_NAME rtems_build_name( 'M', 'A', 'P',
> 'A' )
> >> >   #endif
> >> >
> >> >   #ifndef CONFIGURE_SCHEDULER_TABLE_ENTRIES
> >> >     #define CONFIGURE_SCHEDULER \
> >> >       RTEMS_SCHEDULER_STRONG_APA( \
> >> >         dflt, \
> >> >         CONFIGURE_MAXIMUM_PRIORITY + 1 \
> >> >       )
> >> >
> >> >     #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
> >> >       RTEMS_SCHEDULER_TABLE_STRONG_APA( dflt,
> CONFIGURE_SCHEDULER_NAME )
> >> >   #endif
> >> > #endif
> >> >
> -------------------------------------------------------------------------------------------------------
> >> >
> >> > which is eventually used for:
> >> >
> >> > link
> >> >
> -------------------------------------------------------------------------------------------------------
> >> > const Scheduler_Control _Scheduler_Table[] = {
> >> >   CONFIGURE_SCHEDULER_TABLE_ENTRIES
> >> > };
> >> >
> >> >
> -------------------------------------------------------------------------------------------------------
> >> >
> >> > I do not understand what the Scheduler_Table[] or the
> SCHEDULER_TABLE_ENTRIES should contain.
> >>
> >> The type definition of the _Scheduler_Table[] is Scheduler_Control.
> >> This structure is defined in
> >> cpukit/include/rtems/score/scheduler.h:269
> >>
> >> > I need help with this because I have to change the
> RTEMS_SCHEDULER_TABLE_STRONG_APA since I am changing some of the variables
> in the Scheduler_strong_APA_Context.
> >> >
> >> There is not really anything to change about it. You specialize the
> >> scheduler by the Scheduler_Context and Scheduler_Operations
> >> structures. You still just pass through the context base to the
> >> scheduler table.
> >>
> >> > Thank you,
> >> > Richi.
> >> > _______________________________________________
> >> > devel mailing list
> >> > devel at rtems.org
> >> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200811/3e8d663a/attachment.html>


More information about the devel mailing list