[PATCH] sparc.h: included stdint.h

Mohammed Khoory mkhoory at eiast.ae
Tue May 7 00:23:57 UTC 2013


>On 5/6/2013 8:23 AM, Gedare Bloom wrote:
>> On Mon, May 6, 2013 at 8:48 AM, Ralf Corsepius <ralf.corsepius at rtems.org>
>wrote:
>>> On 05/06/2013 02:10 PM, Gedare Bloom wrote:
>>>> This seems funny. Types are usually pulled in through types.h within
>>>> RTEMS.
>>> This claim is simply incorrect.
>>>
>> I'm pretty sure in the score it is usual to get them from the types.h
>> header, which will pull stdint.h in along with some of the other
>> non-standard types and type definitions used by RTEMS.
>
>I have a more fundamental problem. Why are these header files including
>something which is normally thought of as private?
>
>$ grep
>^#include ./leon3/include/leon.h ./leon2/include/leon.h
./leon3/include/leon
>.h:#include <rtems/score/sparc.h> ./leon3/include/leon.h:#include
><amba.h> ./leon2/include/leon.h:#include <rtems/score/sparc.h>

In the leon.h case, it is included because it needs to disable interrupts.
Including sparc.h seems to make sense to me.

I had to include leon.h into my application because I needed access to
certain registers, and the leon.h header has a bunch of defines and
bitfields that are useful for that sort of thing. There isn't any comment in
the header itself _not_ to include it in an application like what other
headers have, so I thought it was ok. 

Please correct me if I'm wrong. I'm still new to the whole embedded scene. 




More information about the devel mailing list