Strong APA Scheduler : First Draft
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 29 04:49:20 UTC 2020
On 27/07/2020 09:44, Richi Dubey wrote:
> Which compiler error do you get? Maybe there is a cyclic dependency.
>
> I assumed that the schedulersmp.h already includes the percpu.h which
> was not the case. My bad. The error has been removed.
>
> I assumed this because schedulersmp.h uses
> <https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulersmp.h?id=3a95a07d88a6926bd2f67dc53c977b8dbc828f9c#n127> Per_CPU_Control
> and does not show any compilation error, so it should have the
> percpu.h included in one of its included header files right? If it
> has, why did my schedulerstrongapa.h that had the schedulersmp.h
> included give the following error:
>
> /home/richi/quick-start/src/rtems/cpukit/include/rtems/score/schedulerstrongapa.h:102:3:
> error: unknown type name 'Per_CPU_Control'
> Per_CPU_Control cpu;
We have two kinds of header files in the implementation of RTEMS.
Firstly, some header files are included in API header files and are thus
visible to application code. These header files should only define
things which are strictly necessary for applications. Secondly, some
header files are only included in implementation source files.
The purpose of <rtems/score/schedulerstrongapa.h> is to enable the
application to configure this scheduler and nothing more. Please note
that <rtems/score/scheduler.h> uses
struct Per_CPU_Control *cpu
and NOT
Per_CPU_Control *cpu
You can use struct Per_CPU_Control with a forward declaration. This
enables the use of this header file without having to include
<rtems/score/percpu.h>. You should not include <rtems/score/percpu.h> in
<rtems/score/schedulerstrongapa.h> and remove everything from this file
which is not necessary to configure the scheduler.
More information about the devel
mailing list