chiark / gitweb /
core: introduce new Delegate=yes/no property controlling creation of cgroup subhierar...
[elogind.git] / src / core / cgroup.h
index 64d3ac64f58409822ffc42a527ce380d06219e76..3c43885bf28fce6b6d9ea57f942f5d4b032e1e40 100644 (file)
@@ -72,14 +72,10 @@ struct CGroupContext {
 
         unsigned long cpu_shares;
         unsigned long startup_cpu_shares;
-        bool startup_cpu_shares_set:1;
         usec_t cpu_quota_per_sec_usec;
-        usec_t cpu_quota_usec;
-        usec_t cpu_quota_period_usec;
 
         unsigned long blockio_weight;
         unsigned long startup_blockio_weight;
-        bool startup_blockio_weight_set:1;
         LIST_HEAD(CGroupBlockIODeviceWeight, blockio_device_weights);
         LIST_HEAD(CGroupBlockIODeviceBandwidth, blockio_device_bandwidths);
 
@@ -87,6 +83,8 @@ struct CGroupContext {
 
         CGroupDevicePolicy device_policy;
         LIST_HEAD(CGroupDeviceAllow, device_allow);
+
+        bool delegate;
 };
 
 #include "unit.h"
@@ -96,17 +94,14 @@ struct CGroupContext {
 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(Manager *m, CGroupContext *c, CGroupControllerMask mask, const char *path);
+void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const char *path, ManagerState state);
 
-CGroupControllerMask cgroup_context_get_mask(Manager *m, CGroupContext *c);
+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);
 
-usec_t cgroup_context_get_cpu_quota_usec(CGroupContext *c);
-usec_t cgroup_context_get_cpu_quota_per_sec_usec(CGroupContext *c);
-
 CGroupControllerMask unit_get_cgroup_mask(Unit *u);
 CGroupControllerMask unit_get_siblings_mask(Unit *u);
 CGroupControllerMask unit_get_members_mask(Unit *u);