From dbe33c933e60f6c5ef59856f66bb3363eaecdf8b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 3 Sep 2005 08:53:48 +0000 Subject: likely() and unlikely() macros to help (newer) compilers optimize correctly git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16369 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 3f241558ea..4f5afa6b66 100755 --- a/configure +++ b/configure @@ -7161,6 +7161,13 @@ $_def_restrict_keyword /* __builtin_expect branch prediction hint */ $_def_builtin_expect +#ifdef HAVE_BUILTIN_EXPECT +#define likely(x) __builtin_expect ((x) != 0, 1) +#define unlikely(x) __builtin_expect ((x) != 0, 0) +#else +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* attribute(used) as needed by some compilers */ #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) -- cgit v1.2.3