idr: implement idr_preload[_end]() and idr_alloc()
[firefly-linux-kernel-4.4.55.git] / include / linux / res_counter.h
index 6f54e40fa218a3d09aa38aa49513d0c5616a83b5..5ae8456d967010b8cb35b1d861d28a487e2103ba 100644 (file)
@@ -125,14 +125,16 @@ int res_counter_charge_nofail(struct res_counter *counter,
  *
  * these calls check for usage underflow and show a warning on the console
  * _locked call expects the counter->lock to be taken
+ *
+ * returns the total charges still present in @counter.
  */
 
-void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val);
-void res_counter_uncharge(struct res_counter *counter, unsigned long val);
+u64 res_counter_uncharge_locked(struct res_counter *counter, unsigned long val);
+u64 res_counter_uncharge(struct res_counter *counter, unsigned long val);
 
-void res_counter_uncharge_until(struct res_counter *counter,
-                               struct res_counter *top,
-                               unsigned long val);
+u64 res_counter_uncharge_until(struct res_counter *counter,
+                              struct res_counter *top,
+                              unsigned long val);
 /**
  * res_counter_margin - calculate chargeable space of a counter
  * @cnt: the counter