Re: bitops.h ifdef __KERNEL__ cleanup.

From: Petr Vandrovec (
Date: Thu Jul 19 2001 - 12:23:47 EST

On 19 Jul 01 at 12:48, Russell King wrote:
> I totally disagree here. We already say "user space should not include
> kernel headers". Why should bitops.h be any different? Why should atomic.h
> be any different? They contain architecture specific code, yes, which
> may not work in user space.

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

> Oh, and thanks for pointing out ncpfs breaks - I hope the authors will
> fix up their sloppy coding before Davids patch makes it into the kernel.

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...
                                            Best regards,
                                                Petr Vandrovec
P.S.: Part of ncpfs's I do not think that it is that

  AC_CACHE_CHECK(for working asm/atomic.h,
    AC_TRY_LINK([#define __SMP__
#include <asm/atomic.h>],
      [atomic_t a;
       if (atomic_read(&a)) {
         if (!atomic_dec_and_test(&a)) {
  if test "$ncp_cv_asm_atomic_h" = "yes"
    AC_DEFINE(HAVE_ASM_ATOMIC_H, 1, [Define if we have working asm/atomic.h])
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:12 EST