lkml.org 
[lkml]   [2004]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ethtool.h should use userspace-accessible types
On Thu, Mar 11, 2004 at 08:57:56PM -0800, Greg KH wrote:
> u8 means an unsigned 8 bit variable within the kernel.
> __u8 means an unsigned 8 bit variable both within the kernel and
> in userspace. Use the __ forms when describing data structures
> or variables that cross the userspace/kernelspace boundry in
> order to get everything correct.

The only problem is that this is a RETARDED precedent. __foo means the
"internal" version of foo. Within the kernel __foo often means the version
of foo without "the lock".

POSIX defines any type beginning with _ as part of the implementation.
IMHO, no userspace app should *ever* need a type that starts with _ or __.
It's just dumb. If the width matters, define it as a width specific type.
If it doesn't define it as an int/short/whatever. The fact that it isn't
obvious what is or is not kernel-only is an entirely separate issue.

> Becides, something like u8 is a zillion times saner than uint8_t, don't
> you think? :)

As much as uint8_t is a pain in the ass to type, at least it is clear and
obvious and standard, don't you think? :)

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:1.604 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site