Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* asm/bitops.h for Linux/CRIS
2 *
3 * TODO: asm versions if speed is needed
4 *
5 * All bit operations return 0 if the bit was cleared before the
6 * operation and != 0 if it was not.
7 *
8 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
9 */
10
11#ifndef _CRIS_BITOPS_H
12#define _CRIS_BITOPS_H
13
14/* Currently this is unsuitable for consumption outside the kernel. */
15#ifdef __KERNEL__
16
17#ifndef _LINUX_BITOPS_H
18#error only <linux/bitops.h> can be included directly
19#endif
20
21#include <arch/bitops.h>
22#include <linux/compiler.h>
23#include <asm/barrier.h>
24
25#include <asm-generic/bitops/atomic.h>
26#include <asm-generic/bitops/non-atomic.h>
27
28/*
29 * Since we define it "external", it collides with the built-in
30 * definition, which doesn't have the same semantics. We don't want to
31 * use -fno-builtin, so just hide the name ffs.
32 */
33#define ffs(x) kernel_ffs(x)
34
35#include <asm-generic/bitops/fls.h>
36#include <asm-generic/bitops/__fls.h>
37#include <asm-generic/bitops/fls64.h>
38#include <asm-generic/bitops/hweight.h>
39#include <asm-generic/bitops/find.h>
40#include <asm-generic/bitops/lock.h>
41
42#include <asm-generic/bitops/le.h>
43
44#include <asm-generic/bitops/ext2-atomic-setbit.h>
45
46#include <asm-generic/bitops/sched.h>
47
48#endif /* __KERNEL__ */
49
50#endif /* _CRIS_BITOPS_H */