patch-2.3.43 linux/include/asm-sparc64/bitops.h
Next file: linux/include/asm-sparc64/hardirq.h
Previous file: linux/include/asm-sparc/softirq.h
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Wed Feb 9 19:47:20 2000
- Orig file:
v2.3.42/linux/include/asm-sparc64/bitops.h
- Orig date:
Wed Mar 10 16:53:38 1999
diff -u --recursive --new-file v2.3.42/linux/include/asm-sparc64/bitops.h linux/include/asm-sparc64/bitops.h
@@ -1,4 +1,4 @@
-/* $Id: bitops.h,v 1.26 1999/01/07 14:14:15 jj Exp $
+/* $Id: bitops.h,v 1.27 2000/02/09 03:28:33 davem Exp $
* bitops.h: Bit string operations on the V9.
*
* Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -20,7 +20,7 @@
* all bit-ops return 0 if bit was previously clear and != 0 otherwise.
*/
-extern __inline__ unsigned long test_and_set_bit(unsigned long nr, void *addr)
+extern __inline__ int test_and_set_bit(unsigned long nr, void *addr)
{
unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
unsigned long oldbit;
@@ -60,7 +60,7 @@
: "g5", "g7", "cc", "memory");
}
-extern __inline__ unsigned long test_and_clear_bit(unsigned long nr, void *addr)
+extern __inline__ int test_and_clear_bit(unsigned long nr, void *addr)
{
unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
unsigned long oldbit;
@@ -100,7 +100,7 @@
: "g5", "g7", "cc", "memory");
}
-extern __inline__ unsigned long test_and_change_bit(unsigned long nr, void *addr)
+extern __inline__ int test_and_change_bit(unsigned long nr, void *addr)
{
unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
unsigned long oldbit;
@@ -135,9 +135,9 @@
: "g5", "g7", "cc", "memory");
}
-extern __inline__ unsigned long test_bit(int nr, __const__ void *addr)
+extern __inline__ int test_bit(int nr, __const__ void *addr)
{
- return 1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63));
+ return (1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63))) != 0UL;
}
/* The easy/cheese version for now. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)