forked from len0rd/rockbox
Introduce likely() and unlikely() macros, use to give gcc hints about which branch is likely to be taken in a conditional, use them in the midi player for a small speedup, use instead of similar EXPECT macros in tremor and use in mpegplayer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19162 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7bdf9a3392
commit
1284c127f8
5 changed files with 32 additions and 42 deletions
|
@ -32,10 +32,3 @@
|
|||
#define ATTR_ALIGN(align)
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue