]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - include/asm-generic/bitops/fls64.h
[PATCH] bitops: generic fls64()
[linux-2.6-omap-h63xx.git] / include / asm-generic / bitops / fls64.h
1 #ifndef _ASM_GENERIC_BITOPS_FLS64_H_
2 #define _ASM_GENERIC_BITOPS_FLS64_H_
3
4 static inline int fls64(__u64 x)
5 {
6         __u32 h = x >> 32;
7         if (h)
8                 return fls(h) + 32;
9         return fls(x);
10 }
11
12 #endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */