Magellan Linux

Diff of /trunk/mkinitrd-magellan/klibc/usr/include/klibc/compiler.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 1122 by niro, Wed Aug 18 21:11:40 2010 UTC
# Line 21  Line 21 
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
# Line 92  Line 98 
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 */

Legend:
Removed from v.532  
changed lines
  Added in v.1122