X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=cgroup.h;h=d27c063c12fea7d11151be4c5f29adbda507217c;hp=66ddb9579a3c5753322573368ad0260c8b2c5eb7;hb=4e85aff465b2ce0fa34222e52a6f5a984140b22e;hpb=8e27452380193a5f81bfd08a59aab8b07008ba0b diff --git a/cgroup.h b/cgroup.h index 66ddb9579..d27c063c1 100644 --- a/cgroup.h +++ b/cgroup.h @@ -37,8 +37,11 @@ struct CGroupBonding { struct cgroup *cgroup; - /* When shutting down, kill all tasks? */ - bool kill_all:1; + /* 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; @@ -48,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); @@ -73,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);