Re: [PATCH] 2.4.22pre10: {,un}likely_p() macros for pointers

From: Jamie Lokier
Date: Sun Aug 10 2003 - 21:15:59 EST


Chip Salzenberg wrote:
> According to Willy Tarreau:
> > likely => __builtin_expect(!(x), 0)
> > unlikely => __builtin_expect((x), 0)
>
> Well, I'm not sure about the polarity, but that unlikely() macro isn't
> good -- it the same old problem that first prompted my message, namely
> that it's nonportable when (x) has a pointer type.

It's portable as long as the compiler is GCC :)

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/