Difference between pages "r7.1.1:Typedef lfds711 pal int t" and "r7.1.1:Typedef lfds711 pal uint t"
(Difference between pages)
Jump to navigation
Jump to search
m (1 revision imported) |
m (1 revision imported) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:define | {{DISPLAYTITLE:define lfds711_pal_uint_t}} | ||
==Source File== | ==Source File== | ||
└───liblfds711 | └───liblfds711 | ||
Line 7: | Line 7: | ||
==Typedef== | ==Typedef== | ||
typedef [type] | typedef [type] lfds711_pal_uint_t; | ||
==Example== | ==Example== | ||
typedef int long long lfds711_pal_uint_t; | typedef int long long unsigned lfds711_pal_uint_t; | ||
==Optionality== | ==Optionality== | ||
Line 16: | Line 16: | ||
==Notes== | ==Notes== | ||
The library needs | The library needs an unsigned type which is the natural integer length for the platform, so that for example variables used to count the number of elements in a data structure naturally and inherently provide large number ranges on more capable platforms. This type is expected also to be the same length as the type used in atomic operations. | ||
In the C89 standard, there is no such type. It should be that ''int'' works in this way, but it does not, as with Windows and Linux ''int'' is 32 bit on 64 bit platforms. | In the C89 standard, there is no such type. It should be that ''int'' works in this way, but it does not, as with Windows and Linux ''int'' is 32 bit on 64 bit platforms. |
Latest revision as of 20:16, 17 February 2017
Source File
└───liblfds711 └───inc └───liblfds711 lfds711_porting_abstraction_layer_procesor.h
Typedef
typedef [type] lfds711_pal_uint_t;
Example
typedef int long long unsigned lfds711_pal_uint_t;
Optionality
This typedef is mandatory.
Notes
The library needs an unsigned type which is the natural integer length for the platform, so that for example variables used to count the number of elements in a data structure naturally and inherently provide large number ranges on more capable platforms. This type is expected also to be the same length as the type used in atomic operations.
In the C89 standard, there is no such type. It should be that int works in this way, but it does not, as with Windows and Linux int is 32 bit on 64 bit platforms.