Lines Matching full:amount

60 void percpu_counter_set(struct percpu_counter *fbc, s64 amount)  in percpu_counter_set()  argument
70 fbc->count = amount; in percpu_counter_set()
87 void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch) in percpu_counter_add_batch() argument
93 count = __this_cpu_read(*fbc->counters) + amount; in percpu_counter_add_batch()
97 __this_cpu_sub(*fbc->counters, count - amount); in percpu_counter_add_batch()
100 this_cpu_add(*fbc->counters, amount); in percpu_counter_add_batch()
154 int __percpu_counter_init_many(struct percpu_counter *fbc, s64 amount, in __percpu_counter_init_many() argument
177 fbc[i].count = amount; in __percpu_counter_init_many()
282 * Compare counter, and add amount if total is: less than or equal to limit if
283 * amount is positive, or greater than or equal to limit if amount is negative.
284 * Return true if amount is added, or false if total would be beyond the limit.
290 * Overflow beyond S64_MAX is not allowed for: counter, limit and amount
294 s64 limit, s64 amount, s32 batch) in __percpu_counter_limited_add() argument
301 if (amount == 0) in __percpu_counter_limited_add()
309 if (abs(count + amount) <= batch && in __percpu_counter_limited_add()
310 ((amount > 0 && fbc->count + unknown <= limit) || in __percpu_counter_limited_add()
311 (amount < 0 && fbc->count - unknown >= limit))) { in __percpu_counter_limited_add()
312 this_cpu_add(*fbc->counters, amount); in __percpu_counter_limited_add()
318 count = fbc->count + amount; in __percpu_counter_limited_add()
321 if (amount > 0) { in __percpu_counter_limited_add()
341 if (amount > 0) { in __percpu_counter_limited_add()
352 fbc->count += count + amount; in __percpu_counter_limited_add()