Lines Matching defs:percpu_counter

17 /* percpu_counter batch for local add or sub */
22 struct percpu_counter {
33 int __percpu_counter_init_many(struct percpu_counter *fbc, s64 amount,
49 void percpu_counter_destroy_many(struct percpu_counter *fbc, u32 nr_counters);
50 static inline void percpu_counter_destroy(struct percpu_counter *fbc)
55 void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
56 void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount,
58 s64 __percpu_counter_sum(struct percpu_counter *fbc);
59 int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch);
60 bool __percpu_counter_limited_add(struct percpu_counter *fbc, s64 limit,
62 void percpu_counter_sync(struct percpu_counter *fbc);
64 static inline int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
69 static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
75 percpu_counter_limited_add(struct percpu_counter *fbc, s64 limit, s64 amount)
92 percpu_counter_add_local(struct percpu_counter *fbc, s64 amount)
97 static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
103 static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
108 static inline s64 percpu_counter_read(struct percpu_counter *fbc)
118 static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
128 static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
135 struct percpu_counter {
139 static inline int percpu_counter_init_many(struct percpu_counter *fbc,
151 static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount,
157 static inline void percpu_counter_destroy_many(struct percpu_counter *fbc,
162 static inline void percpu_counter_destroy(struct percpu_counter *fbc)
166 static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
171 static inline int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
182 __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)
188 percpu_counter_add(struct percpu_counter *fbc, s64 amount)
198 percpu_counter_limited_add(struct percpu_counter *fbc, s64 limit, s64 amount)
220 percpu_counter_add_local(struct percpu_counter *fbc, s64 amount)
226 percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
231 static inline s64 percpu_counter_read(struct percpu_counter *fbc)
237 * percpu_counter is intended to track positive numbers. In the UP case the
240 static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
245 static inline s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
250 static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
255 static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
260 static inline void percpu_counter_sync(struct percpu_counter *fbc)
265 static inline void percpu_counter_inc(struct percpu_counter *fbc)
270 static inline void percpu_counter_dec(struct percpu_counter *fbc)
275 static inline void percpu_counter_sub(struct percpu_counter *fbc, s64 amount)
281 percpu_counter_sub_local(struct percpu_counter *fbc, s64 amount)