summaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-02-21 17:07:14 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-02-21 17:07:14 +0100
commite29371d762df5bb35d2bc434ea266a046e5a0a75 (patch)
treedac4a8db52d92453415f35606130a49e9f32e4ef /include/linux/compiler.h
parent17b14ca25e9cd6c5cd7605941f6120e405a84f8b (diff)
parent894e2ac82bd0029adce7ad6c8d25501fdd82c994 (diff)
Merge branch 'master' of git://1984.lsi.us.es/nf
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 f430e4162f4..dd852b73b28 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -10,6 +10,7 @@
# define __force __attribute__((force))
# define __nocast __attribute__((nocast))
# define __iomem __attribute__((noderef, address_space(2)))
+# define __must_hold(x) __attribute__((context(x,1,1)))
# define __acquires(x) __attribute__((context(x,0,1)))
# define __releases(x) __attribute__((context(x,1,0)))
# define __acquire(x) __context__(x,1)
@@ -33,6 +34,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
# define __chk_user_ptr(x) (void)0
# define __chk_io_ptr(x) (void)0
# define __builtin_warning(x, y...) (1)
+# define __must_hold(x)
# define __acquires(x)
# define __releases(x)
# define __acquire(x) (void)0
@@ -42,6 +44,10 @@ extern void __chk_io_ptr(const volatile void __iomem *);
# define __rcu
#endif
+/* Indirect macros required for expanded argument pasting, eg. __LINE__. */
+#define ___PASTE(a,b) a##b
+#define __PASTE(a,b) ___PASTE(a,b)
+
#ifdef __KERNEL__
#ifdef __GNUC__
@@ -164,6 +170,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
(typeof(ptr)) (__ptr + (off)); })
#endif
+/* Not-quite-unique ID. */
+#ifndef __UNIQUE_ID
+# define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
+#endif
+
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */