Messages in this thread | | | Subject | Re: [PATCH] CodingStyle: add typedefs chapter | From | David Woodhouse <> | Date | Mon, 01 May 2006 18:06:06 +0100 |
| |
On Sun, 2006-04-30 at 17:44 -0700, Randy.Dunlap wrote: > + (b) Clear integer types, where the abstraction _helps_ avoid confusion > + whether it is "int" or "long". > + > + u8/u16/u32 are perfectly fine typedefs.
No, u8/u16/u32 are fall into category (d):
(d) New types which are identical to standard C99 types, in certain exceptional circumstances.
Although it would only take a short amount of time for the eyes and brain to become accustomed to the standard types like 'uint32_t', some people object to their use anyway.
Therefore, the gratuitous 'u8/u16/u32/u64' types and their signed equivalents which are identical to standard types are permitted -- although they are not mandatory.
(e) Types safe for use in userspace.
In certain structures which are visible to userspace, we cannot require C99 types and cannot use the 'u32' form above. Thus, we use __u32 and similar types in all structures which are shared with userspace.
-- dwmw2
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |