X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fust%2Fkernelcompat.h;h=1b9058dc2f54ffdbf6a8bdcddf6dcdb22258f115;hb=6fa0d97f663351869797d35ddb504489e223fa7c;hp=b6e85c3fb5353267b3a8d9988187c63c6d61acb1;hpb=22d9080d680ccc515346b26eaed46f990af817b7;p=ust.git diff --git a/include/ust/kernelcompat.h b/include/ust/kernelcompat.h index b6e85c3..1b9058d 100644 --- a/include/ust/kernelcompat.h +++ b/include/ust/kernelcompat.h @@ -18,7 +18,7 @@ #ifndef KERNELCOMPAT_H #define KERNELCOMPAT_H -#include +#include #include /* FIXME: libkcompat must not define arch-specific local ops, as ust *must* @@ -87,6 +87,7 @@ static inline long IS_ERR(const void *ptr) /* MATH */ +#include static inline unsigned int hweight32(unsigned int w) { unsigned int res = w - ((w >> 1) & 0x55555555); @@ -96,22 +97,6 @@ static inline unsigned int hweight32(unsigned int w) return (res + (res >> 16)) & 0x000000FF; } -static inline int fls(int x) -{ - int r; -//ust// #ifdef CONFIG_X86_CMOV - asm("bsrl %1,%0\n\t" - "cmovzl %2,%0" - : "=&r" (r) : "rm" (x), "rm" (-1)); -//ust// #else -//ust// asm("bsrl %1,%0\n\t" -//ust// "jnz 1f\n\t" -//ust// "movl $-1,%0\n" -//ust// "1:" : "=r" (r) : "rm" (x)); -//ust// #endif - return r + 1; -} - static __inline__ int get_count_order(unsigned int count) { int order;