X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=cgroup.h;h=d27c063c12fea7d11151be4c5f29adbda507217c;hb=136337ff74f05be3d42a769d9f0cb99716c5c40f;hp=b7e18bf620825025d1ee1d64071226f29d045ced;hpb=50159e6a776143be076f8ebe73a8a59447050698;p=elogind.git diff --git a/cgroup.h b/cgroup.h index b7e18bf62..d27c063c1 100644 --- a/cgroup.h +++ b/cgroup.h @@ -37,6 +37,12 @@ struct CGroupBonding { struct cgroup *cgroup; + /* For the Unit::cgroup_bondings list */ + LIST_FIELDS(CGroupBonding, by_unit); + + /* For the Manager::cgroup_bondings hashmap */ + LIST_FIELDS(CGroupBonding, by_path); + /* When shutting down, remove cgroup? */ bool clean_up:1; @@ -45,12 +51,6 @@ struct CGroupBonding { /* Inherit parameters from parent group */ bool inherit:1; - - /* For the Unit::cgroup_bondings list */ - LIST_FIELDS(CGroupBonding, by_unit); - - /* For the Manager::cgroup_bondings hashmap */ - LIST_FIELDS(CGroupBonding, by_path); }; int cgroup_bonding_realize(CGroupBonding *b); @@ -70,10 +70,12 @@ int cgroup_bonding_is_empty_list(CGroupBonding *first); CGroupBonding *cgroup_bonding_find_list(CGroupBonding *first, const char *controller); +char *cgroup_bonding_to_string(CGroupBonding *b); + #include "manager.h" int manager_setup_cgroup(Manager *m); -int manager_shutdown_cgroup(Manager *m); +int manager_shutdown_cgroup(Manager *m, bool delete); int cgroup_notify_empty(Manager *m, const char *group);