summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/bitops.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
committer <ralf@linux-mips.org>1995-11-14 08:00:00 +0000
commite7c2a72e2680827d6a733931273a93461c0d8d1b (patch)
treec9abeda78ef7504062bb2e816bcf3e3c9d680112 /include/asm-generic/bitops.h
parentec6044459060a8c9ce7f64405c465d141898548c (diff)
Import of Linux/MIPS 1.3.0
Diffstat (limited to 'include/asm-generic/bitops.h')
-rw-r--r--include/asm-generic/bitops.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h
deleted file mode 100644
index 7b0350da1..000000000
--- a/include/asm-generic/bitops.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_H
-#define _ASM_GENERIC_BITOPS_H
-
-/*
- * For the benefit of those who are trying to port Linux to another
- * architecture, here are some C-language equivalents. You should
- * recode these in the native assembly language, if at all possible.
- * To guarantee atomicity, these routines call cli() and sti() to
- * disable interrupts while they operate. (You have to provide inline
- * routines to cli() and sti().)
- *
- * Also note, these routines assume that you have 32 bit integers.
- * You will have to change this if you are trying to port Linux to the
- * Alpha architecture or to a Cray. :-)
- *
- * C language equivalents written by Theodore Ts'o, 9/26/92
- */
-
-#ifdef __USE_GENERIC_set_bit
-extern __inline__ int set_bit(int nr, void * addr)
-{
- int mask, retval;
- int *a = addr;
-
- a += nr >> 5;
- mask = 1 << (nr & 0x1f);
- cli();
- retval = (mask & *a) != 0;
- *a |= mask;
- sti();
- return retval;
-}
-#endif
-
-#ifdef __USE_GENERIC_clear_bit
-extern __inline__ int clear_bit(int nr, void * addr)
-{
- int mask, retval;
- int *a = addr;
-
- a += nr >> 5;
- mask = 1 << (nr & 0x1f);
- cli();
- retval = (mask & *a) != 0;
- *a &= ~mask;
- sti();
- return retval;
-}
-#endif
-
-#ifdef __USE_GENERIC_test_bit
-extern __inline__ int test_bit(int nr, void * addr)
-{
- int mask;
- int *a = addr;
-
- a += nr >> 5;
- mask = 1 << (nr & 0x1f);
- return ((mask & *a) != 0);
-}
-#endif
-
-#ifdef __USE_GENERIC_find_first_zero_bit
-#error "Generic find_first_zero_bit() not written yet."
-#endif
-
-#ifdef __USE_GENERIC_find_next_zero_bit
-#error "Generic find_next_zero_bit() not written yet."
-#endif
-
-#endif /* _ASM_GENERIC_BITOPS_H */