Lines Matching defs:amount

33 int __percpu_counter_init_many(struct percpu_counter *fbc, s64 amount,
55 void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
56 void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount,
61 s64 amount, s32 batch);
69 static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
71 percpu_counter_add_batch(fbc, amount, percpu_counter_batch);
75 percpu_counter_limited_add(struct percpu_counter *fbc, s64 limit, s64 amount)
77 return __percpu_counter_limited_add(fbc, limit, amount,
92 percpu_counter_add_local(struct percpu_counter *fbc, s64 amount)
94 percpu_counter_add_batch(fbc, amount, PERCPU_COUNTER_LOCAL_BATCH);
140 s64 amount, gfp_t gfp,
146 fbc[i].count = amount;
151 static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount,
154 return percpu_counter_init_many(fbc, amount, gfp, 1);
166 static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
168 fbc->count = amount;
188 percpu_counter_add(struct percpu_counter *fbc, s64 amount)
193 fbc->count += amount;
198 percpu_counter_limited_add(struct percpu_counter *fbc, s64 limit, s64 amount)
204 if (amount == 0)
208 count = fbc->count + amount;
209 if ((amount > 0 && count <= limit) ||
210 (amount < 0 && count >= limit)) {
220 percpu_counter_add_local(struct percpu_counter *fbc, s64 amount)
222 percpu_counter_add(fbc, amount);
226 percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
228 percpu_counter_add(fbc, amount);
275 static inline void percpu_counter_sub(struct percpu_counter *fbc, s64 amount)
277 percpu_counter_add(fbc, -amount);
281 percpu_counter_sub_local(struct percpu_counter *fbc, s64 amount)
283 percpu_counter_add_local(fbc, -amount);