2 * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 # define inline inline __attribute__ ((always_inline))
8 # define __noreturn __attribute__ ((noreturn))
9 # define __malloc __attribute__ ((malloc))
10 # define __a_unused __attribute__ ((unused))
11 # define likely(x) __builtin_expect (!!(x), 1)
12 # define unlikely(x) __builtin_expect (!!(x), 0)
14 * p is the number of the "format string" parameter, and q is
15 * the number of the first variadic parameter
17 # define __printf(p,q) __attribute__ ((format (printf, p, q)))
19 * as direct use of __printf(p,q) confuses doxygen, here are two extra macros
20 * for those values p,q that are actually used.
22 #define __printf_1_2 __printf(1,2)
23 #define __printf_2_3 __printf(2,3)
25 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
26 # define __must_check __attribute__ ((warn_unused_result))
28 # define __must_check /* no warn_unused_result */
31 #define _static_inline_ static inline