public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: bitops.h ifdef __KERNEL__ cleanup.
Date: Thu, 19 Jul 2001 19:37:23 +0100	[thread overview]
Message-ID: <20010719193723.I5024@flint.arm.linux.org.uk> (raw)
In-Reply-To: <917E9842025@vcnet.vc.cvut.cz>
In-Reply-To: <917E9842025@vcnet.vc.cvut.cz>; from VANDROVE@vc.cvut.cz on Thu, Jul 19, 2001 at 07:21:48PM +0000

On Thu, Jul 19, 2001 at 07:21:48PM +0000, Petr Vandrovec wrote:
> Maybe because of I do not know ARM assembler? If you do not want
> kernel headers to be used in apps, just move them from asm and linux
> into msa and xunil. Then you can simple remove all #ifdef __KERNEL__
> from them...

Why should the kernel change to please a problem minority in user space
who shouldn't be including kernel headers in the first place?

> It will still work. Only resulting binary will be slower. That's what
> autoconf is for. If ncpfs does not compile for you, better to contact
> me directly, as I'm ncpfs maintainer...

No.  The binary _will_ not do what you expect - these functions are
not atomic in user space on all architecture types.  Yes they may work,
but not with the atomic side effects.  You won't get this from a simple
autoconf test.

I'll give you credit though - you're at least checking that they appear
to exist; I have come across many programs which rely on them existing,
and do not check that they exist.

It is these that David and myself wish to target, and this along with
the general rule of "Never include kernel headers in user code", it
seems to be the most appropriate solution.

Now, there is a nice clean solution to your problem - bug the glibc
people to provide equivalents in their library, hopefully as inline
asm in the systems header files.  Systems which need to do extra stuff
can then have them implemented in the C library.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2001-07-19 18:37 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 [this message]
2001-07-19 21:53 ` David Woodhouse
2001-07-20  4:18   ` H. Peter Anvin
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=20010719193723.I5024@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=VANDROVE@vc.cvut.cz \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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