bitops.h 1.3 KB
Newer Older
1 2
#ifndef __ASM_GENERIC_BITOPS_H
#define __ASM_GENERIC_BITOPS_H
L
Linus Torvalds 已提交
3 4 5 6 7

/*
 * 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.
8
 *
L
Linus Torvalds 已提交
9 10 11
 * C language equivalents written by Theodore Ts'o, 9/26/92
 */

12 13 14 15 16 17 18 19 20 21 22
#include <linux/irqflags.h>
#include <linux/compiler.h>

/*
 * clear_bit may not imply a memory barrier
 */
#ifndef smp_mb__before_clear_bit
#define smp_mb__before_clear_bit()	smp_mb()
#define smp_mb__after_clear_bit()	smp_mb()
#endif

23 24 25
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/ffz.h>
#include <asm-generic/bitops/fls.h>
26
#include <asm-generic/bitops/__fls.h>
27 28
#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/find.h>
L
Linus Torvalds 已提交
29

J
Jiri Slaby 已提交
30 31 32 33
#ifndef _LINUX_BITOPS_H
#error only <linux/bitops.h> can be included directly
#endif

34 35 36
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/hweight.h>
N
Nick Piggin 已提交
37
#include <asm-generic/bitops/lock.h>
L
Linus Torvalds 已提交
38

39 40
#include <asm-generic/bitops/atomic.h>
#include <asm-generic/bitops/non-atomic.h>
41
#include <asm-generic/bitops/le.h>
42 43 44
#include <asm-generic/bitops/ext2-non-atomic.h>
#include <asm-generic/bitops/ext2-atomic.h>
#include <asm-generic/bitops/minix.h>
L
Linus Torvalds 已提交
45

46
#endif /* __ASM_GENERIC_BITOPS_H */