Re: Different files than the current master?

2020-10-30 Thread Richi Dubey
HI Dr. Sherrill,

Thanks a lot for looking into this. I have realized my mistakes. I should
have looked around a bit more before asking on the devel.

On Fri, Oct 30, 2020 at 12:08 AM Joel Sherrill  wrote:

>
>
> On Thu, Oct 29, 2020 at 10:53 AM Richi Dubey  wrote:
>
>> Hi,
>>
>> I have attached my cpukit/include/rtems/confdefs/scheduler.h with this
>> email, which is different from the current file that I should have, which
>> can be seen here:
>> https://git.rtems.org/rtems/tree/cpukit/include/rtems/confdefs/scheduler.h
>> .
>>
>
> I think you are looking at the wrong file named scheduler.h. There are
> three options apparently:
>
> $ find cpukit/ -name scheduler.h
> cpukit/include/rtems/confdefs/scheduler.h
> cpukit/include/rtems/scheduler.h
> cpukit/include/rtems/score/scheduler.h
>
> And the file you attached looks more like cpukit/include/rtems/scheduler.h
>
>  diff -u  ~/Downloads/scheduler.h cpukit/include/rtems/scheduler.h
> --- /home/joel/Downloads/scheduler.h2020-10-29 13:32:18.338022528 -0500
> +++ cpukit/include/rtems/scheduler.h2020-10-12 16:26:27.858302686 -0500
> @@ -257,14 +257,16 @@
>#define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
>  static struct { \
>Scheduler_strong_APA_Context Base; \
> -  Scheduler_strong_APA_CPU CPU[ CONFIGURE_MAXIMUM_PROCESSORS ]; \
> +  Chain_ControlReady[ ( prio_count ) ]; \
>  } SCHEDULER_STRONG_APA_CONTEXT_NAME( name )
>
>#define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
>  { \
>_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
>SCHEDULER_STRONG_APA_ENTRY_POINTS, \
> -  SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY, \
> +  RTEMS_ARRAY_SIZE( \
> +SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Ready \
> +  ) - 1, \
>( obj_name ) \
>SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
>  }
>
>>
>> On running :
>>
>> $ git log --oneline
>> 68239434c2 (HEAD -> master, origin/master, origin/HEAD) score: Fix unused
>> parameter 'lock' warning
>> eebad5ffcd build: Improve cache handling
>> b052e3aefa build: Report caching errors
>> 99494370d6 bsp/stm32h7: New BSP
>> c44e404888 bsp/stm32h7: Fix warnings
>>
>> I can verify that my RTEMS is at the current
>>  master, why are the files different then?
>>
>> - Richi
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Different files than the current master?

2020-10-29 Thread Joel Sherrill
On Thu, Oct 29, 2020 at 10:53 AM Richi Dubey  wrote:

> Hi,
>
> I have attached my cpukit/include/rtems/confdefs/scheduler.h with this
> email, which is different from the current file that I should have, which
> can be seen here:
> https://git.rtems.org/rtems/tree/cpukit/include/rtems/confdefs/scheduler.h
> .
>

I think you are looking at the wrong file named scheduler.h. There are
three options apparently:

$ find cpukit/ -name scheduler.h
cpukit/include/rtems/confdefs/scheduler.h
cpukit/include/rtems/scheduler.h
cpukit/include/rtems/score/scheduler.h

And the file you attached looks more like cpukit/include/rtems/scheduler.h

 diff -u  ~/Downloads/scheduler.h cpukit/include/rtems/scheduler.h
--- /home/joel/Downloads/scheduler.h2020-10-29 13:32:18.338022528 -0500
+++ cpukit/include/rtems/scheduler.h2020-10-12 16:26:27.858302686 -0500
@@ -257,14 +257,16 @@
   #define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
 static struct { \
   Scheduler_strong_APA_Context Base; \
-  Scheduler_strong_APA_CPU CPU[ CONFIGURE_MAXIMUM_PROCESSORS ]; \
+  Chain_ControlReady[ ( prio_count ) ]; \
 } SCHEDULER_STRONG_APA_CONTEXT_NAME( name )

   #define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
 { \
   _STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
   SCHEDULER_STRONG_APA_ENTRY_POINTS, \
-  SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY, \
+  RTEMS_ARRAY_SIZE( \
+SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Ready \
+  ) - 1, \
   ( obj_name ) \
   SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
 }

>
> On running :
>
> $ git log --oneline
> 68239434c2 (HEAD -> master, origin/master, origin/HEAD) score: Fix unused
> parameter 'lock' warning
> eebad5ffcd build: Improve cache handling
> b052e3aefa build: Report caching errors
> 99494370d6 bsp/stm32h7: New BSP
> c44e404888 bsp/stm32h7: Fix warnings
>
> I can verify that my RTEMS is at the current
>  master, why are the files different then?
>
> - Richi
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Different files than the current master?

2020-10-29 Thread Richi Dubey
Hi,

I have attached my cpukit/include/rtems/confdefs/scheduler.h with this
email, which is different from the current file that I should have, which
can be seen here:
https://git.rtems.org/rtems/tree/cpukit/include/rtems/confdefs/scheduler.h.

On running :

$ git log --oneline
68239434c2 (HEAD -> master, origin/master, origin/HEAD) score: Fix unused
parameter 'lock' warning
eebad5ffcd build: Improve cache handling
b052e3aefa build: Report caching errors
99494370d6 bsp/stm32h7: New BSP
c44e404888 bsp/stm32h7: Fix warnings

I can verify that my RTEMS is at the current 
master, why are the files different then?

- Richi
/**
 * @file
 *
 * @brief Scheduler Configuration API
 */

/*
 * Copyright (c) 2014, 2018 embedded brains GmbH.  All rights reserved.
 *
 *  embedded brains GmbH
 *  Dornierstr. 4
 *  82178 Puchheim
 *  Germany
 *  
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifndef _RTEMS_SAPI_SCHEDULER_H
#define _RTEMS_SAPI_SCHEDULER_H

#include 

#define SCHEDULER_CONTEXT_NAME( name ) \
  _Configuration_Scheduler_ ## name

#if defined(RTEMS_SMP)
  #define SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( value ) \
, value
#else
  #define SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( value )
#endif

#if defined(RTEMS_SMP)
  /* This object doesn't exist and indicates a configuration error */
  extern const Scheduler_Control RTEMS_SCHEDULER_INVALID_INDEX;

  #define RTEMS_SCHEDULER_ASSIGN_DEFAULT \
SCHEDULER_ASSIGN_DEFAULT

  #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL

  #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY \
SCHEDULER_ASSIGN_PROCESSOR_MANDATORY

  #define RTEMS_SCHEDULER_ASSIGN( index, attr ) \
{ \
  ( index ) < RTEMS_ARRAY_SIZE( _Scheduler_Table ) ? \
&_Scheduler_Table[ ( index ) ] : _SCHEDULER_INVALID_INDEX, \
  ( attr ) \
}

  #define RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER { NULL, 0 }
#endif

/*
 * This file should be only included in the context of .
 * Define the scheduler configuration macros only in case the corresponding
 * configure symbol is defined.  This is necessary to prevent invalid workspace
 * size estimates since we have to account for the per-thread scheduler
 * information.
 */

#ifdef CONFIGURE_SCHEDULER_CBS
  #include 

  #define SCHEDULER_CBS_CONTEXT_NAME( name ) \
SCHEDULER_CONTEXT_NAME( CBS_ ## name )

  #define RTEMS_SCHEDULER_CBS( name ) \
static Scheduler_EDF_Context SCHEDULER_CBS_CONTEXT_NAME( name )

  #define RTEMS_SCHEDULER_TABLE_CBS( name, obj_name ) \
{ \
  _CBS_CONTEXT_NAME( name ).Base, \
  SCHEDULER_CBS_ENTRY_POINTS, \
  SCHEDULER_CBS_MAXIMUM_PRIORITY, \
  ( obj_name ) \
  SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
}

  /* Provided for backward compatibility */

  #define RTEMS_SCHEDULER_CONTEXT_CBS( name ) \
RTEMS_SCHEDULER_CBS( name )

  #define RTEMS_SCHEDULER_CONTROL_CBS( name, obj_name ) \
RTEMS_SCHEDULER_TABLE_CBS( name, obj_name )
#endif

#ifdef CONFIGURE_SCHEDULER_EDF
  #include 

  #define SCHEDULER_EDF_CONTEXT_NAME( name ) \
SCHEDULER_CONTEXT_NAME( EDF_ ## name )

  #define RTEMS_SCHEDULER_EDF( name ) \
static Scheduler_EDF_Context SCHEDULER_EDF_CONTEXT_NAME( name )

  #define RTEMS_SCHEDULER_TABLE_EDF( name, obj_name ) \
{ \
  _EDF_CONTEXT_NAME( name ).Base, \
  SCHEDULER_EDF_ENTRY_POINTS, \
  SCHEDULER_EDF_MAXIMUM_PRIORITY, \
  ( obj_name ) \
  SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( true ) \
}

  /* Provided for backward compatibility */

  #define RTEMS_SCHEDULER_CONTEXT_EDF( name ) \
RTEMS_SCHEDULER_EDF( name )

  #define RTEMS_SCHEDULER_CONTROL_EDF( name, obj_name ) \
RTEMS_SCHEDULER_TABLE_EDF( name, obj_name )
#endif

#ifdef CONFIGURE_SCHEDULER_EDF_SMP
  #include 

  #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 ) \
{ \
  _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

#ifdef