Andrew Morton wrote:
>
> Is it not possible to fix it for all time?
>
> --- linux-2.5.9/include/linux/compiler.h Sun Apr 14 15:45:08 2002
> +++ 25/include/linux/compiler.h Tue Apr 23 11:27:37 2002
> @@ -10,8 +10,8 @@
> #define __builtin_expect(x, expected_value) (x)
> #endif
>
> -#define likely(x) __builtin_expect((x),1)
> -#define unlikely(x) __builtin_expect((x),0)
> +#define likely(x) __builtin_expect((x) != 0, 1)
> +#define unlikely(x) __builtin_expect((x) != 0, 0)
>
> /* This macro obfuscates arithmetic on a variable address so that gcc
> shouldn't recognize the original var, and make assumptions about it */
Wouldn't "!!(x)" make more sense here than "(x) != 0"?
(I don't like comparing pointers with integers.)
-- Kasper Dupont -- der bruger for meget tid på usenet. For sending spam use mailto:razor-report@daimi.au.dk - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:36 EST