bitops.h ifdef __KERNEL__ cleanup.

David Woodhouse (dwmw2@infradead.org)
Wed, 18 Jul 2001 23:54:36 +0100


Not all architectures put clear_bit et al in asm/bitops.h in a form which
is usable from userspace. Yet because it happens to work on a PeeCee,
people do it anyway.

There's a simple way to fix that :)

Index: include/asm-i386/bitops.h
===================================================================
RCS file: /inst/cvs/linux/include/asm-i386/bitops.h,v
retrieving revision 1.2.2.7
diff -u -r1.2.2.7 bitops.h
--- include/asm-i386/bitops.h 2001/06/02 16:27:54 1.2.2.7
+++ include/asm-i386/bitops.h 2001/07/18 22:52:11
@@ -7,6 +7,8 @@

#include <linux/config.h>

+#ifdef __KERNEL__
+
/*
* These have to be done with inline assembly: that way the bit-setting
* is guaranteed to be atomic. All bit operations return 0 if the bit
@@ -329,8 +331,6 @@
:"r" (~word));
return word;
}
-
-#ifdef __KERNEL__

/**
* ffs - find first bit set

--
dwmw2

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