diff options
Diffstat (limited to 'include/asm-generic/local.h')
-rw-r--r-- | include/asm-generic/local.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index fc218444e315..c8a5d68541d7 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -52,23 +52,4 @@ typedef struct | |||
52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) | 52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) |
53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) | 53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) |
54 | 54 | ||
55 | /* Use these for per-cpu local_t variables: on some archs they are | ||
56 | * much more efficient than these naive implementations. Note they take | ||
57 | * a variable (eg. mystruct.foo), not an address. | ||
58 | */ | ||
59 | #define cpu_local_read(l) local_read(&__get_cpu_var(l)) | ||
60 | #define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i)) | ||
61 | #define cpu_local_inc(l) local_inc(&__get_cpu_var(l)) | ||
62 | #define cpu_local_dec(l) local_dec(&__get_cpu_var(l)) | ||
63 | #define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l)) | ||
64 | #define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l)) | ||
65 | |||
66 | /* Non-atomic increments, ie. preemption disabled and won't be touched | ||
67 | * in interrupt, etc. Some archs can optimize this case well. | ||
68 | */ | ||
69 | #define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l)) | ||
70 | #define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l)) | ||
71 | #define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l)) | ||
72 | #define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l)) | ||
73 | |||
74 | #endif /* _ASM_GENERIC_LOCAL_H */ | 55 | #endif /* _ASM_GENERIC_LOCAL_H */ |