diff options
Diffstat (limited to 'include/linux/percpu_counter.h')
-rw-r--r-- | include/linux/percpu_counter.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index bd6708e2c027..682525511c9e 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -39,6 +39,7 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); | 41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); |
42 | long percpu_counter_sum(struct percpu_counter *fbc); | ||
42 | 43 | ||
43 | static inline long percpu_counter_read(struct percpu_counter *fbc) | 44 | static inline long percpu_counter_read(struct percpu_counter *fbc) |
44 | { | 45 | { |
@@ -92,6 +93,11 @@ static inline long percpu_counter_read_positive(struct percpu_counter *fbc) | |||
92 | return fbc->count; | 93 | return fbc->count; |
93 | } | 94 | } |
94 | 95 | ||
96 | static inline long percpu_counter_sum(struct percpu_counter *fbc) | ||
97 | { | ||
98 | return percpu_counter_read_positive(fbc); | ||
99 | } | ||
100 | |||
95 | #endif /* CONFIG_SMP */ | 101 | #endif /* CONFIG_SMP */ |
96 | 102 | ||
97 | static inline void percpu_counter_inc(struct percpu_counter *fbc) | 103 | static inline void percpu_counter_inc(struct percpu_counter *fbc) |