404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.21.159.60: ~ $
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_GENERIC_BITOPS_FFS_H_
#define _ASM_GENERIC_BITOPS_FFS_H_

/**
 * ffs - find first bit set
 * @x: the word to search
 *
 * This is defined the same way as
 * the libc and compiler builtin ffs routines, therefore
 * differs in spirit from the above ffz (man ffs).
 */
static inline int ffs(int x)
{
	int r = 1;

	if (!x)
		return 0;
	if (!(x & 0xffff)) {
		x >>= 16;
		r += 16;
	}
	if (!(x & 0xff)) {
		x >>= 8;
		r += 8;
	}
	if (!(x & 0xf)) {
		x >>= 4;
		r += 4;
	}
	if (!(x & 3)) {
		x >>= 2;
		r += 2;
	}
	if (!(x & 1)) {
		x >>= 1;
		r += 1;
	}
	return r;
}

#endif /* _ASM_GENERIC_BITOPS_FFS_H_ */

Filemanager

Name Type Size Permission Actions
__ffs.h File 777 B 0644
__fls.h File 920 B 0644
arch_hweight.h File 555 B 0644
atomic.h File 5.5 KB 0644
builtin-__ffs.h File 379 B 0644
builtin-__fls.h File 436 B 0644
builtin-ffs.h File 410 B 0644
builtin-fls.h File 403 B 0644
const_hweight.h File 1.67 KB 0644
ext2-atomic-setbit.h File 403 B 0644
ext2-atomic.h File 600 B 0644
ffs.h File 654 B 0644
ffz.h File 325 B 0644
find.h File 1.94 KB 0644
fls.h File 674 B 0644
fls64.h File 860 B 0644
hweight.h File 254 B 0644
le.h File 2.19 KB 0644
lock.h File 1.23 KB 0644
non-atomic.h File 3 KB 0644
sched.h File 760 B 0644