[CRIU] [PATCH 3/4] cgroup: mount functions about cgroup out of proc_parse.h
Andrei Vagin
avagin at openvz.org
Tue Aug 16 08:22:24 PDT 2016
From: Andrei Vagin <avagin at virtuozzo.com>
It breate a dependence between proc_parse.h and cgroup.h
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/cgroup.c | 1 -
criu/include/cgroup.h | 24 ++++++++++++++++++++++++
criu/include/proc_parse.h | 23 -----------------------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/criu/cgroup.c b/criu/cgroup.c
index db3daad..431ba30 100644
--- a/criu/cgroup.c
+++ b/criu/cgroup.c
@@ -13,7 +13,6 @@
#include "cgroup-props.h"
#include "cr_options.h"
#include "pstree.h"
-#include "proc_parse.h"
#include "util.h"
#include "imgset.h"
#include "util-pie.h"
diff --git a/criu/include/cgroup.h b/criu/include/cgroup.h
index fd7ffd8..3c4321d 100644
--- a/criu/include/cgroup.h
+++ b/criu/include/cgroup.h
@@ -69,4 +69,28 @@ int parse_cg_info(void);
int new_cg_root_add(char *controller, char *newroot);
extern struct ns_desc cgroup_ns_desc;
+
+/*
+ * This struct describes a group controlled by one controller.
+ * The @name is the controller name or 'name=...' for named cgroups.
+ * The @path is the path from the hierarchy root.
+ */
+
+struct cg_ctl {
+ struct list_head l;
+ char *name;
+ char *path;
+ u32 cgns_prefix;
+};
+
+/*
+ * Returns the list of cg_ctl-s sorted by name
+ */
+struct list_head;
+struct parasite_dump_cgroup_args;
+extern int parse_task_cgroup(int pid, struct parasite_dump_cgroup_args *args, struct list_head *l, unsigned int *n);
+extern void put_ctls(struct list_head *);
+
+int collect_controllers(struct list_head *cgroups, unsigned int *n_cgroups);
+
#endif /* __CR_CGROUP_H__ */
diff --git a/criu/include/proc_parse.h b/criu/include/proc_parse.h
index 889aee1..a530f49 100644
--- a/criu/include/proc_parse.h
+++ b/criu/include/proc_parse.h
@@ -162,29 +162,6 @@ extern int get_fd_mntid(int fd, int *mnt_id);
struct pid;
extern int parse_threads(int pid, struct pid **_t, int *_n);
-/*
- * This struct describes a group controlled by one controller.
- * The @name is the controller name or 'name=...' for named cgroups.
- * The @path is the path from the hierarchy root.
- */
-
-struct cg_ctl {
- struct list_head l;
- char *name;
- char *path;
- u32 cgns_prefix;
-};
-
-/*
- * Returns the list of cg_ctl-s sorted by name
- */
-struct list_head;
-struct parasite_dump_cgroup_args;
-extern int parse_task_cgroup(int pid, struct parasite_dump_cgroup_args *args, struct list_head *l, unsigned int *n);
-extern void put_ctls(struct list_head *);
-
-int collect_controllers(struct list_head *cgroups, unsigned int *n_cgroups);
-
int parse_children(pid_t pid, pid_t **_c, int *_n);
#endif /* __CR_PROC_PARSE_H__ */
--
2.7.4
More information about the CRIU
mailing list