2 * Copyright 2005 Timo Hirvonen
9 * GCC 2.96 or compatible required
12 /* Optimization: Condition @x is likely */
13 #define likely(x) __builtin_expect(!!(x), 1)
15 /* Optimization: Condition @x is unlikely */
16 #define unlikely(x) __builtin_expect(!!(x), 0)
18 /* Optimization: Function never returns */
19 #define __NORETURN __attribute__((__noreturn__))
21 /* Argument at index @fmt_idx is printf compatible format string and
22 * argument at index @first_idx is the first format argument */
23 #define __FORMAT(fmt_idx, first_idx) __attribute__((format(printf, (fmt_idx), (first_idx))))
25 #if defined(__GNUC__) && (__GNUC__ >= 3)
27 /* Optimization: Pointer returned can't alias other pointers */
28 #define __MALLOC __attribute__((__malloc__))