[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] CODING_STYLE: document intended usage of types
Jan Beulich writes ("[PATCH RFC] CODING_STYLE: document intended usage of types"): > +Types > +----- > + > +Use basic C types and C standard mandated typedef-s where possible (and > +with preference in this order). This in particular means to avoid u8, > +u16, etc despite those types continuing to exist in our code base. > +Fixed width types should only be used when a fixed width quantity is > +meant (which for example may be a value read from or to be written to a > +register). This should have more practical advice, in the form of examples. In particular, what types should be used for guest and host addreses in various contexts ? Also, what assumptions should be made about the sizes of standard types ? Should "short" be used when the value is known to fit in 16 bits ? In this context it would probably also be worth mentioning that the programmer may assume that the machine is two's-complement and has 8-bit bytes. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |