From dc62a30e274d003a4d08fb888f1520add4b21373 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 16 Oct 2007 23:25:46 -0700 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/percpu_counter.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/percpu_counter.h') 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 { #endif int percpu_counter_init(struct percpu_counter *fbc, s64 amount); +int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount); void percpu_counter_destroy(struct percpu_counter *fbc); void percpu_counter_set(struct percpu_counter *fbc, s64 amount); void __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) return 0; } +#define percpu_counter_init_irq percpu_counter_init + static inline void percpu_counter_destroy(struct percpu_counter *fbc) { } -- cgit v1.2.3-59-g8ed1b