diff options
| -rw-r--r-- | include/linux/compiler-gcc4.h | 2 | ||||
| -rw-r--r-- | include/linux/compiler.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 412bc6c2b023..56c802cba7f6 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | 31 | ||
| 32 | #define __linktime_error(message) __attribute__((__error__(message))) | 32 | #define __linktime_error(message) __attribute__((__error__(message))) |
| 33 | 33 | ||
| 34 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
| 35 | |||
| 34 | #if __GNUC_MINOR__ >= 5 | 36 | #if __GNUC_MINOR__ >= 5 |
| 35 | /* | 37 | /* |
| 36 | * Mark a position in code as unreachable. This can be used to | 38 | * Mark a position in code as unreachable. This can be used to |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f430e4162f41..5f45335e1ac7 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -42,6 +42,10 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
| 42 | # define __rcu | 42 | # define __rcu |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | /* Indirect macros required for expanded argument pasting, eg. __LINE__. */ | ||
| 46 | #define ___PASTE(a,b) a##b | ||
| 47 | #define __PASTE(a,b) ___PASTE(a,b) | ||
| 48 | |||
| 45 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
| 46 | 50 | ||
| 47 | #ifdef __GNUC__ | 51 | #ifdef __GNUC__ |
| @@ -164,6 +168,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 164 | (typeof(ptr)) (__ptr + (off)); }) | 168 | (typeof(ptr)) (__ptr + (off)); }) |
| 165 | #endif | 169 | #endif |
| 166 | 170 | ||
| 171 | /* Not-quite-unique ID. */ | ||
| 172 | #ifndef __UNIQUE_ID | ||
| 173 | # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__) | ||
| 174 | #endif | ||
| 175 | |||
| 167 | #endif /* __KERNEL__ */ | 176 | #endif /* __KERNEL__ */ |
| 168 | 177 | ||
| 169 | #endif /* __ASSEMBLY__ */ | 178 | #endif /* __ASSEMBLY__ */ |
