Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

From: Greg KH
Date: Fri Nov 26 2004 - 22:34:14 EST


On Thu, Nov 25, 2004 at 06:17:42PM +0000, David Woodhouse wrote:
> On Thu, 2004-11-25 at 16:54 +0000, Matthew Wilcox wrote:
> > > (d) stdint types should be used where possible.
> > >
> > > [include/user-i386/termios.h]
> > > struct winsize {
> > > uint16_t ws_row;
> > > uint16_t ws_col;
> > > uint16_t ws_xpixel;
> > > uint16_t ws_ypixel;
> > > };
> >
> > I really hate stdint. Can't we use __u16 instead?
>
> We're trying to clean all this crap up. I think we'd need a better
> justification than 'I hate stdint' to use anything other than the
> standard types which the language provides.

The justification is that it doesn't properly describe the variable size
(think userspace 32 bit variable vs. kernelspace 32 bit variable.) We
need to stick with the proper __u32 type variables for data that crosses
the userspace/kernelspace boundry.

See Linus's posts about this topic on lkml in the past for more details
about this.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/