This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newbie qn about eCos integral types


In gmane.os.ecos.general, you wrote:

>> On both processors cyg_uint16 is exactly 16 bits and cyg_uint32 is
>> exactly 32 bits. Hence those data types can be used reliably for
>> describing hardware, for defining network protocols, etc.
>>
>> However cyg_ucount16 is 16 bits on the 16-bit processor and 32
>> bits on the 32-bit processor. In both cases cyg_ucount16 is
>> the most efficient data type that provides at least the
>> specified number of bits.

IOW, it's a different spelling of the C<mumble> standard types
int_fastNN_t and uint_fastNN_t.

> Sounds like a good application for "int" or "unsigned int".

There are (now) actually standard C types for the usage in
question, but I don't think gcc implemented them back in the
early days of eCos.  Maybe they weren't even in the standards
back them -- I forget.

> Having a type alias for a 32-bit integer with "16" in its name
> is pretty confusing, leading to questions like this.

You'll have to have chat with the C standards people: the
standard types *_fast16_t are probably 32 bits on a lot of
platforms.

-- 
Grant Edwards                   grante             Yow!  ... PENGUINS are
                                  at               floating by...
                               visi.com            

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]