aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/percpu_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/percpu_counter.h')
-rw-r--r--include/linux/percpu_counter.h6
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
41void percpu_counter_mod(struct percpu_counter *fbc, long amount); 41void percpu_counter_mod(struct percpu_counter *fbc, long amount);
42long percpu_counter_sum(struct percpu_counter *fbc);
42 43
43static inline long percpu_counter_read(struct percpu_counter *fbc) 44static 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
96static 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
97static inline void percpu_counter_inc(struct percpu_counter *fbc) 103static inline void percpu_counter_inc(struct percpu_counter *fbc)