On Thu, Mar 12, 2015 at 9:21 AM, Amar Takhar <a...@rtems.org> wrote: > On 2015-03-12 14:19 +0100, Sebastian Huber wrote: >> >> >> On 12/03/15 14:13, Amar Takhar wrote: >> > On 2015-03-12 14:10 +0100, Sebastian Huber wrote: >> >> >> >>> #include <rtems/sparc/cpu.h> >> >>> #include <rtems/score/percpu.h> >> >> This will not work. We have sparc, arm, powerpc etc. and they must not >> >> be visible at the same time. >> > What do you mean by 'visible'? >> >> If I build for arm, then I need the arm <rtems/score/cpu.h> and not the >> one for sparc or powerpc. > > I wasn't clear. Wherever you include 'percpu.h' you would include the correct > cpu.h above it and remove the #include <...cpu.h> from percpu.h. > This doesn't work in supposedly CPU-independent source code files.
Let's take percpu.h as an example. We need to include it in <rtems/score/thread.h> -- the main header for thread scheduling that is included by virtually every source file in the supercore. We can't include the CPU-dependent headers here, unless we use the CPP #if-elif cascase as mentioned by Sebastian. Gedare > > Amar. > _______________________________________________ > 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