| .. | |||||
| __ffs.h | |||||
| __fls.h | |||||
| arch_hweight.h | |||||
| atomic.h | |||||
| builtin-__ffs.h | |||||
| builtin-__fls.h | |||||
| builtin-ffs.h | |||||
| builtin-fls.h | |||||
| const_hweight.h | |||||
| count_zeros.h | |||||
| ext2-atomic-setbit.h | |||||
| ext2-atomic.h | |||||
| ffs.h | |||||
| ffz.h | |||||
| find.h | |||||
| fls.h | |||||
| fls64.h | |||||
| hweight.h | |||||
| le.h | |||||
| lock.h | |||||
| non-atomic.h | |||||
| sched.h |
| Server IP : 103.169.32.36 / Your IP : 216.73.217.13 Web Server : Apache System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/asm-generic/bitops/ |
Upload File : |
#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_ */
| .. | |||||
| __ffs.h | |||||
| __fls.h | |||||
| arch_hweight.h | |||||
| atomic.h | |||||
| builtin-__ffs.h | |||||
| builtin-__fls.h | |||||
| builtin-ffs.h | |||||
| builtin-fls.h | |||||
| const_hweight.h | |||||
| count_zeros.h | |||||
| ext2-atomic-setbit.h | |||||
| ext2-atomic.h | |||||
| ffs.h | |||||
| ffz.h | |||||
| find.h | |||||
| fls.h | |||||
| fls64.h | |||||
| hweight.h | |||||
| le.h | |||||
| lock.h | |||||
| non-atomic.h | |||||
| sched.h |