From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: bitops.h ifdef __KERNEL__ cleanup.
Date: 19 Jul 2001 21:18:41 -0700 [thread overview]
Message-ID: <9j8bf1$1at$1@cesium.transmeta.com> (raw)
In-Reply-To: <917E9842025@vcnet.vc.cvut.cz> <11472.995579612@redhat.com>
Followup to: <11472.995579612@redhat.com>
By author: David Woodhouse <dwmw2@infradead.org>
In newsgroup: linux.dev.kernel
>
> It has been stated many times that kernel headers should not be used in
> apps. Renaming or moving them should not be necessary - and people would
> probably only start to use them again anyway. We'd see autoconf checks to
> find whether it's linux/private.h or xunil/private.h :)
>
> In the absence of any expectation that userspace developers will ever obey
> the simple and oft-repeated rule that you don't use kernel headers from
> userspace, the #ifdef __KERNEL__ approach would seem to be the best on
> offer.
>
Note that the rule is at least in part theoretical; even glibc include
kernel headers or -derivatives.
I think the idea with <asm/bitops.h> is that they are protected by
#ifdef __KERNEL__ if they are kernel-only; however, if they work in
user space then there is no #ifdef and autoconf can detect their
presence.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
next prev parent reply other threads:[~2001-07-20 4:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-19 19:21 bitops.h ifdef __KERNEL__ cleanup Petr Vandrovec
2001-07-19 18:37 ` Russell King
2001-07-19 21:53 ` David Woodhouse
2001-07-20 4:18 ` H. Peter Anvin [this message]
2001-07-21 6:41 ` Jeff Garzik
2001-07-27 5:05 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2001-07-19 12:54 Petr Vandrovec
2001-07-19 11:48 ` Russell King
2001-07-18 22:54 David Woodhouse
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='9j8bf1$1at$1@cesium.transmeta.com' \
--to=hpa@zytor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.