Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
builtin-fls.h
Go to the documentation of this file.
1 #ifndef _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
2 #define _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
3 
11 static __always_inline int fls(int x)
12 {
13  return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
14 }
15 
16 #endif