summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2009-04-24 09:52:14 +0530
committerBalbir Singh <balbir@linux.vnet.ibm.com>2009-04-24 09:52:14 +0530
commit739cdfd62e14d2558566cf73ce9e1702929cf834 (patch)
tree0e180c007728a8eedcbd6d806e902f1327de6b9c /include
parent01b53987d3587d026fcfc0f0486fed24e8737feb (diff)
parent7136dbf03169a9dbe515175c480276fb1877a7b1 (diff)
downloadlibcg-739cdfd62e14d2558566cf73ce9e1702929cf834.tar.gz
libcg-739cdfd62e14d2558566cf73ce9e1702929cf834.tar.xz
libcg-739cdfd62e14d2558566cf73ce9e1702929cf834.zip
Merge branch 'master' of ssh://balbir_singh@libcg.git.sourceforge.net/gitroot/libcg
Diffstat (limited to 'include')
-rw-r--r--include/libcgroup.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index efa852b..085c17a 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -274,6 +274,25 @@ int cgroup_read_stats_next(void **handle, struct cgroup_stat *stat);
int cgroup_read_stats_end(void **handle);
+/**
+ * Read the tasks file to get the list of tasks in a cgroup
+ * @cgroup: Name of the cgroup
+ * @controller: Name of the cgroup subsystem
+ * @handle: Handle to be used in the iteration
+ * @pid: The pid read from the tasks file. Will be filled in by the API
+ */
+int cgroup_get_task_begin(char *cgroup, char *controller, void **handle,
+ pid_t *pid);
+
+/**
+ * Read the next task value
+ * @handle: The handle used for iterating
+ * @pid: The variable where the value will be stored
+ *
+ * return ECGEOF when the iterator finishes getting the list of tasks.
+ */
+int cgroup_get_task_next(void *handle, pid_t *pid);
+int cgroup_get_task_end(void **handle);
/* The wrappers for filling libcg structures */
struct cgroup *cgroup_new_cgroup(const char *name);