| .. | |||||
| __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.119.1.el7.x86_64/build/include/asm-generic/bitops/ |
Upload File : |
#ifndef _ASM_GENERIC_BITOPS___FLS_H_
#define _ASM_GENERIC_BITOPS___FLS_H_
#include <asm/types.h>
/**
* __fls - find last (most-significant) set bit in a long word
* @word: the word to search
*
* Undefined if no set bit exists, so code should check against 0 first.
*/
static __always_inline unsigned long __fls(unsigned long word)
{
int num = BITS_PER_LONG - 1;
#if BITS_PER_LONG == 64
if (!(word & (~0ul << 32))) {
num -= 32;
word <<= 32;
}
#endif
if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
num -= 16;
word <<= 16;
}
if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
num -= 8;
word <<= 8;
}
if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
num -= 4;
word <<= 4;
}
if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
num -= 2;
word <<= 2;
}
if (!(word & (~0ul << (BITS_PER_LONG-1))))
num -= 1;
return num;
}
#endif /* _ASM_GENERIC_BITOPS___FLS_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 |