21 |
#endif |
#endif |
22 |
|
|
23 |
/* How to declare a function that *must* be inlined */ |
/* How to declare a function that *must* be inlined */ |
24 |
|
/* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */ |
25 |
#ifdef __GNUC__ |
#ifdef __GNUC__ |
26 |
# if __GNUC__ >= 3 |
# if __GNUC__ >= 3 |
27 |
# define __must_inline static __inline__ __attribute__((always_inline)) |
# ifdef __GNUC_STDC_INLINE__ |
28 |
|
# define __must_inline extern __inline__ \ |
29 |
|
__attribute__((__gnu_inline__,__always_inline__)) |
30 |
|
# else |
31 |
|
# define __must_inline extern __inline__ __attribute__((__always_inline__)) |
32 |
|
# endif |
33 |
# else |
# else |
34 |
# define __must_inline extern __inline__ |
# define __must_inline extern __inline__ |
35 |
# endif |
# endif |
98 |
|
|
99 |
/* likely/unlikely */ |
/* likely/unlikely */ |
100 |
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) |
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) |
101 |
# define __likely(x) __builtin_expect((x), 1) |
# define __likely(x) __builtin_expect(!!(x), 1) |
102 |
# define __unlikely(x) __builtin_expect((x), 0) |
# define __unlikely(x) __builtin_expect(!!(x), 0) |
103 |
#else |
#else |
104 |
# define __likely(x) (x) |
# define __likely(x) (!!(x)) |
105 |
# define __unlikely(x) (x) |
# define __unlikely(x) (!!(x)) |
106 |
#endif |
#endif |
107 |
|
|
108 |
/* Possibly unused function */ |
/* Possibly unused function */ |