mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
fix CLAMP_LIKELY/UNLIKELY definition
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2036 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ecf349dc6c
commit
3c17c7d442
2 changed files with 4 additions and 4 deletions
|
|
@ -79,8 +79,8 @@
|
|||
|
||||
#ifndef PA_LIKELY
|
||||
#ifdef __GNUC__
|
||||
#define PA_LIKELY(x) __builtin_expect((x),1)
|
||||
#define PA_UNLIKELY(x) __builtin_expect((x),0)
|
||||
#define PA_LIKELY(x) (__builtin_expect((x),1))
|
||||
#define PA_UNLIKELY(x) (__builtin_expect((x),0))
|
||||
#else
|
||||
#define PA_LIKELY(x) (x)
|
||||
#define PA_UNLIKELY(x) (x)
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ static inline size_t pa_page_align(size_t l) {
|
|||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
#endif
|
||||
|
||||
#define PA_CLAMP_LIKELY(x, low, high) (PA_LIKELY((x) > (high)) ? (high) : PA_LIKELY(((x) < (low)) ? (low) : (x)))
|
||||
#define PA_CLAMP_UNLIKELY(x, low, high) (PA_UNLIKELY((x) > (high)) ? (high) : PA_UNLIKELY(((x) < (low)) ? (low) : (x)))
|
||||
#define PA_CLAMP_LIKELY(x, low, high) (PA_LIKELY((x) > (high)) ? (high) : (PA_LIKELY((x)<(low)) ? (low) : (x)))
|
||||
#define PA_CLAMP_UNLIKELY(x, low, high) (PA_UNLIKELY((x) > (high)) ? (high) : (PA_UNLIKELY((x) < (low)) ? (low) : (x)))
|
||||
|
||||
/* This type is not intended to be used in exported APIs! Use classic "int" there! */
|
||||
#ifdef HAVE_STD_BOOL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue