aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/percpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r--include/linux/percpu.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index cb9039a21f2a..f926490a7d8b 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -11,8 +11,14 @@
11#define PERCPU_ENOUGH_ROOM 32768 11#define PERCPU_ENOUGH_ROOM 32768
12#endif 12#endif
13 13
14/* Must be an lvalue. */ 14/*
15#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); })) 15 * Must be an lvalue. Since @var must be a simple identifier,
16 * we force a syntax error here if it isn't.
17 */
18#define get_cpu_var(var) (*({ \
19 extern int simple_indentifier_##var(void); \
20 preempt_disable(); \
21 &__get_cpu_var(var); }))
16#define put_cpu_var(var) preempt_enable() 22#define put_cpu_var(var) preempt_enable()
17 23
18#ifdef CONFIG_SMP 24#ifdef CONFIG_SMP