Commit 62a84938 authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

cgroup: move functions about cgroup out of proc_parse.h

It removes a dependence between proc_parse.h and cgroup.h

v2: type fix in the subject
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d0d11798
......@@ -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"
......
......@@ -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__ */
......@@ -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__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment