aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-10-17 02:25:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:44 -0400
commitdc62a30e274d003a4d08fb888f1520add4b21373 (patch)
tree15835cabc7b9fbc6b213be6f7c0fa5003e44fdb3 /include
parent833f4077bf7c2dcff6e31526e03ec2ad91c88581 (diff)
lib: percpu_counter_init_irq
provide a way to tell lockdep about percpu_counters that are supposed to be used from irq safe contexts. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu_counter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index f7ecd38d7e9c..9007ccdfc112 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -31,6 +31,7 @@ struct percpu_counter {
31#endif 31#endif
32 32
33int percpu_counter_init(struct percpu_counter *fbc, s64 amount); 33int percpu_counter_init(struct percpu_counter *fbc, s64 amount);
34int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount);
34void percpu_counter_destroy(struct percpu_counter *fbc); 35void percpu_counter_destroy(struct percpu_counter *fbc);
35void percpu_counter_set(struct percpu_counter *fbc, s64 amount); 36void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
36void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); 37void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
@@ -84,6 +85,8 @@ static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
84 return 0; 85 return 0;
85} 86}
86 87
88#define percpu_counter_init_irq percpu_counter_init
89
87static inline void percpu_counter_destroy(struct percpu_counter *fbc) 90static inline void percpu_counter_destroy(struct percpu_counter *fbc)
88{ 91{
89} 92}