aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f430e4162f41..dd852b73b286 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -10,6 +10,7 @@
10# define __force __attribute__((force)) 10# define __force __attribute__((force))
11# define __nocast __attribute__((nocast)) 11# define __nocast __attribute__((nocast))
12# define __iomem __attribute__((noderef, address_space(2))) 12# define __iomem __attribute__((noderef, address_space(2)))
13# define __must_hold(x) __attribute__((context(x,1,1)))
13# define __acquires(x) __attribute__((context(x,0,1))) 14# define __acquires(x) __attribute__((context(x,0,1)))
14# define __releases(x) __attribute__((context(x,1,0))) 15# define __releases(x) __attribute__((context(x,1,0)))
15# define __acquire(x) __context__(x,1) 16# define __acquire(x) __context__(x,1)
@@ -33,6 +34,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
33# define __chk_user_ptr(x) (void)0 34# define __chk_user_ptr(x) (void)0
34# define __chk_io_ptr(x) (void)0 35# define __chk_io_ptr(x) (void)0
35# define __builtin_warning(x, y...) (1) 36# define __builtin_warning(x, y...) (1)
37# define __must_hold(x)
36# define __acquires(x) 38# define __acquires(x)
37# define __releases(x) 39# define __releases(x)
38# define __acquire(x) (void)0 40# define __acquire(x) (void)0
@@ -42,6 +44,10 @@ extern void __chk_io_ptr(const volatile void __iomem *);
42# define __rcu 44# define __rcu
43#endif 45#endif
44 46
47/* Indirect macros required for expanded argument pasting, eg. __LINE__. */
48#define ___PASTE(a,b) a##b
49#define __PASTE(a,b) ___PASTE(a,b)
50
45#ifdef __KERNEL__ 51#ifdef __KERNEL__
46 52
47#ifdef __GNUC__ 53#ifdef __GNUC__
@@ -164,6 +170,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
164 (typeof(ptr)) (__ptr + (off)); }) 170 (typeof(ptr)) (__ptr + (off)); })
165#endif 171#endif
166 172
173/* Not-quite-unique ID. */
174#ifndef __UNIQUE_ID
175# define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
176#endif
177
167#endif /* __KERNEL__ */ 178#endif /* __KERNEL__ */
168 179
169#endif /* __ASSEMBLY__ */ 180#endif /* __ASSEMBLY__ */