diff options
author | Paul Menage <menage@google.com> | 2008-04-29 03:59:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:08 -0400 |
commit | 2c7eabf37647dd459d555e76954b4de87be2321f (patch) | |
tree | 553a080db29ad1d9724e6c7da30f64f5fe7cc12a /include/linux/res_counter.h | |
parent | f4c753b7eacc277e506066abdda351cbc1cf8e6a (diff) |
CGroup API files: add res_counter_read_u64()
Adds a function for returning the value of a resource counter member, in a
form suitable for use in a cgroup read_u64 control file method.
Signed-off-by: Paul Menage <menage@google.com>
Cc: "Li Zefan" <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "YAMAMOTO Takashi" <yamamoto@valinux.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/res_counter.h')
-rw-r--r-- | include/linux/res_counter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 61363ce896d5..8cb1ecd420a9 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -39,8 +39,9 @@ struct res_counter { | |||
39 | spinlock_t lock; | 39 | spinlock_t lock; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | /* | 42 | /** |
43 | * Helpers to interact with userspace | 43 | * Helpers to interact with userspace |
44 | * res_counter_read_u64() - returns the value of the specified member. | ||
44 | * res_counter_read/_write - put/get the specified fields from the | 45 | * res_counter_read/_write - put/get the specified fields from the |
45 | * res_counter struct to/from the user | 46 | * res_counter struct to/from the user |
46 | * | 47 | * |
@@ -51,6 +52,8 @@ struct res_counter { | |||
51 | * @pos: and the offset. | 52 | * @pos: and the offset. |
52 | */ | 53 | */ |
53 | 54 | ||
55 | u64 res_counter_read_u64(struct res_counter *counter, int member); | ||
56 | |||
54 | ssize_t res_counter_read(struct res_counter *counter, int member, | 57 | ssize_t res_counter_read(struct res_counter *counter, int member, |
55 | const char __user *buf, size_t nbytes, loff_t *pos, | 58 | const char __user *buf, size_t nbytes, loff_t *pos, |
56 | int (*read_strategy)(unsigned long long val, char *s)); | 59 | int (*read_strategy)(unsigned long long val, char *s)); |