]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/res_counter.h
Memory controller improve user interface
[linux-2.6-omap-h63xx.git] / include / linux / res_counter.h
index 5e60a4f342432559a93c8b9207451abb190012c1..61363ce896d5988857ed440087147eb27bc4e1c5 100644 (file)
@@ -23,15 +23,15 @@ struct res_counter {
        /*
         * the current resource consumption level
         */
-       unsigned long usage;
+       unsigned long long usage;
        /*
         * the limit that usage cannot exceed
         */
-       unsigned long limit;
+       unsigned long long limit;
        /*
         * the number of unsuccessful attempts to consume the resource
         */
-       unsigned long failcnt;
+       unsigned long long failcnt;
        /*
         * the lock to protect all of the above.
         * the routines below consider this to be IRQ-safe
@@ -52,9 +52,11 @@ struct res_counter {
  */
 
 ssize_t res_counter_read(struct res_counter *counter, int member,
-               const char __user *buf, size_t nbytes, loff_t *pos);
+               const char __user *buf, size_t nbytes, loff_t *pos,
+               int (*read_strategy)(unsigned long long val, char *s));
 ssize_t res_counter_write(struct res_counter *counter, int member,
-               const char __user *buf, size_t nbytes, loff_t *pos);
+               const char __user *buf, size_t nbytes, loff_t *pos,
+               int (*write_strategy)(char *buf, unsigned long long *val));
 
 /*
  * the field descriptors. one for each member of res_counter