[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] CODING_STYLE: document intended usage of types



>>> On 19.02.18 at 14:39, <ian.jackson@xxxxxxxxxx> wrote:
> Jan Beulich writes ("Re: [PATCH RFC] CODING_STYLE: document intended usage of 
> types"):
>> Types to be used for addresses - from a really generic pov -
>> depend on the architecture. Iirc there are some where a signed
>> type is the more natural representation, while on x86 and ARM
>> we'd certainly use "unsigned long". Since guests may be of
>> different bitness, specifying what type to use for their addresses
>> would go too far anyway imo.
> 
> If the underlying C type depends on the architecture, then the code
> should use a suitable typedef.  In generic code this means that the
> code is portable and correct; in arch-specific code it means it's
> consistent with the generic code.

Well, for the specific example there is uintptr_t, but the Linux
world appears to dislike it (and we're sort of following suit). Hence
for the foreseeable future it'll continue to be unsigned long.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.