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