Go to the documentation of this file. 1 #ifndef __LINUX_COMPILER_H
2 #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
12 #define barrier() __asm__ __volatile__("": : :"memory")
32 #define RELOC_HIDE(ptr, off) \
33 ({ unsigned long __ptr; \
34 __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
35 (typeof(ptr)) (__ptr + (off)); })
38 #define __must_be_array(arr) 0
41 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
48 #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
49 !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
50 # define inline inline __attribute__((always_inline)) notrace
51 # define __inline__ __inline__ __attribute__((always_inline)) notrace
52 # define __inline __inline __attribute__((always_inline)) notrace
55 # define inline inline notrace
56 # define __inline__ __inline__ notrace
57 # define __inline __inline notrace
60 #define __deprecated __attribute__((deprecated))
61 #define __packed __attribute__((packed))
62 #define __weak __attribute__((weak))
74 #define __naked __attribute__((naked)) noinline __noclone notrace
76 #define __noreturn __attribute__((noreturn))
88 #define __pure __attribute__((pure))
89 #define __aligned(x) __attribute__((aligned(x)))
90 #define __printf(a, b) __attribute__((format(printf, a, b)))
91 #define __scanf(a, b) __attribute__((format(scanf, a, b)))
92 #define noinline __attribute__((noinline))
93 #define __attribute_const__ __attribute__((__const__))
94 #define __maybe_unused __attribute__((unused))
95 #define __always_unused __attribute__((unused))
97 #define __gcc_header(x) #x
98 #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
99 #define gcc_header(x) _gcc_header(x)
100 #include gcc_header(__GNUC__)
102 #if !defined(__noclone)
110 #define uninitialized_var(x) x = x
112 #define __always_inline inline __attribute__((always_inline))