summaryrefslogtreecommitdiffstats
path: root/include/libcgroup.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2009-06-18 19:42:45 +0530
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-06-18 19:49:39 +0530
commita32b08930f1828b39d6cafd2779bdab66aebc484 (patch)
treead0be225f4af0e0c7369021810f1541487709e81 /include/libcgroup.h
parent89874676e7a84e504e3b2829228c7c3863a6d500 (diff)
downloadlibcg-a32b08930f1828b39d6cafd2779bdab66aebc484.tar.gz
libcg-a32b08930f1828b39d6cafd2779bdab66aebc484.tar.xz
libcg-a32b08930f1828b39d6cafd2779bdab66aebc484.zip
libcgroup: Add flags to the walk_tree handle
Introduce a cgroup_tree_handle structure so that we can track flags for the walk_tree operation. In a number of cases we would prefer to walk the tree in postorder as opposed to pre-order which is the current default. This patch does the addition. Changes since V1: 1. Added checks for !handle as suggested by Bharata Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Diffstat (limited to 'include/libcgroup.h')
-rw-r--r--include/libcgroup.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index c526f58..149a560 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -256,6 +256,16 @@ int cgroup_walk_tree_next(const int depth, void **handle,
int cgroup_walk_tree_end(void **handle);
/**
+ * This API is used to set the flags for walk_tree API. Currently availble
+ * flags are
+ *
+ * CGROUP_WALK_TYPE_PRE_DIR
+ * CGROUP_WALK_TYPE_POST_DIR
+ *
+ */
+int cgroup_walk_tree_set_flags(void **handle, int flags);
+
+/**
* Read the statistics values for the specified controller
* @controller: Name of the controller for which stats are requested.
* @path: cgroup path.