diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-02-14 19:11:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-02-17 15:49:21 +0100 |
commit | bc432dc7eb62c5671f2b741a86a66393adb350dc (patch) | |
tree | b7fb6ea81706fa02363c842cd233387d6b777bf9 /src/core/cgroup.h | |
parent | b1e90ec515408aec2702522f6f68c4920b56375b (diff) |
core: rework cgroup mask propagation
Previously a cgroup setting down tree would result in cgroup membership
additions being propagated up the tree and to the siblings, however a
unit could never lose cgroup memberships again. With this change we'll
make sure that both cgroup additions and removals propagate properly.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r-- | src/core/cgroup.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 25f40f7b62..be717ad877 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -90,12 +90,19 @@ void cgroup_context_init(CGroupContext *c); void cgroup_context_done(CGroupContext *c); void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix); void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const char *path); + CGroupControllerMask cgroup_context_get_mask(CGroupContext *c); void cgroup_context_free_device_allow(CGroupContext *c, CGroupDeviceAllow *a); void cgroup_context_free_blockio_device_weight(CGroupContext *c, CGroupBlockIODeviceWeight *w); void cgroup_context_free_blockio_device_bandwidth(CGroupContext *c, CGroupBlockIODeviceBandwidth *b); +CGroupControllerMask unit_get_cgroup_mask(Unit *u); +CGroupControllerMask unit_get_siblings_mask(Unit *u); +CGroupControllerMask unit_get_members_mask(Unit *u); +CGroupControllerMask unit_get_target_mask(Unit *u); + +void unit_update_cgroup_members_masks(Unit *u); int unit_realize_cgroup(Unit *u); void unit_destroy_cgroup(Unit *u); @@ -113,5 +120,3 @@ int manager_notify_cgroup_empty(Manager *m, const char *group); const char* cgroup_device_policy_to_string(CGroupDevicePolicy i) _const_; CGroupDevicePolicy cgroup_device_policy_from_string(const char *s) _pure_; - -void unit_update_member_masks(Unit *u); |