Thanks, I am assuming this is the code that allocates space: #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 )
How do we use or refer to this 'Base'? How do we link this 'Ready' to the 'Ready' inside the EDF_SMP_Context? On Thu, Aug 13, 2020 at 6:17 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > On 13/08/2020 14:42, Richi Dubey wrote: > > > I want to use arrays with size _CONFIGURE_MAXIMUM_PROCESSORS. Is it > > okay if I define the arrays with this size while writing the scheduler > > strong APA header file? I am asking this because the value of this > > header gets defined at the time the test case runs while the scheduler > > gets linked to the test case at the time of linking. So how would it > > work? > > Do NOT use _CONFIGURE_MAXIMUM_PROCESSORS. > > In <rtems/scheduler.h> please use something similar to the EDF scheduler > instantiation: > > #ifdef CONFIGURE_SCHEDULER_EDF_SMP > #include <rtems/score/scheduleredfsmp.h> > > #ifndef CONFIGURE_MAXIMUM_PROCESSORS > #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 ) \ > } > > /* Provided for backward compatibility */ > > #define RTEMS_SCHEDULER_CONTEXT_EDF_SMP( name, max_cpu_count ) \ > RTEMS_SCHEDULER_EDF_SMP( name ) > > #define RTEMS_SCHEDULER_CONTROL_EDF_SMP( name, obj_name ) \ > RTEMS_SCHEDULER_TABLE_EDF_SMP( name, obj_name ) > #endif >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel