From: Tim Hockin <thockin@hockin.org>
To: Greg KH <greg@kroah.com>
Cc: Eric Brower <ebrower@usa.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ethtool.h should use userspace-accessible types
Date: Fri, 12 Mar 2004 01:19:18 -0800 [thread overview]
Message-ID: <20040312091918.GB10549@hockin.org> (raw)
In-Reply-To: <20040312045756.GA30714@kroah.com>
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? :)
next prev parent reply other threads:[~2004-03-12 9:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-12 1:54 Eric Brower
2004-03-12 2:35 ` Tim Hockin
2004-03-12 4:57 ` Greg KH
2004-03-12 9:19 ` Tim Hockin [this message]
2004-03-12 16:25 ` Eric W. Biederman
2004-03-12 16:54 ` Jeff Garzik
2004-03-12 17:06 ` Eric W. Biederman
2004-03-12 21:48 ` Jonathan Lundell
2004-03-14 3:25 ` Matt Mackall
2004-03-15 21:24 ` Jonathan Lundell
2004-03-12 16:54 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040312091918.GB10549@hockin.org \
--to=thockin@hockin.org \
--cc=ebrower@usa.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®