X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fcgroup.h;fp=src%2Fcore%2Fcgroup.h;h=2a5a223eb677212fadf3fa1b5c553b5d686519a4;hb=58172968ad2f9a350172f062cc459d070569916d;hp=1957f2d83a4e0c90525ed8445ac7e147be0a927f;hpb=66ecc207e203db5434610395cd04c40ae8727b58;p=elogind.git diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 1957f2d83..2a5a223eb 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -21,21 +21,11 @@ #include -// #include "list.h" -// #include "time-util.h" +//#include "list.h" #include "logind.h" +//#include "time-util.h" #if 0 /// UNNEEDED by elogind -typedef struct CGroupContext CGroupContext; -Stypedef struct CGroupDeviceAllow CGroupDeviceAllow; -typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight; -typedef struct CGroupBlockIODeviceBandwidth CGroupBlockIODeviceBandwidth; - -/* Maximum value for fixed (manual) net class ID assignment, - * and also the value at which the range of automatic assignments starts - */ -#define CGROUP_NETCLASS_FIXED_MAX UINT32_C(65535) - typedef struct CGroupContext CGroupContext; typedef struct CGroupDeviceAllow CGroupDeviceAllow; typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight; @@ -57,17 +47,6 @@ typedef enum CGroupDevicePolicy { _CGROUP_DEVICE_POLICY_INVALID = -1 } CGroupDevicePolicy; -typedef enum CGroupNetClassType { - /* Default - do not assign a net class */ - CGROUP_NETCLASS_TYPE_NONE, - - /* Automatically assign a net class */ - CGROUP_NETCLASS_TYPE_AUTO, - - /* Assign the net class that was provided by the user */ - CGROUP_NETCLASS_TYPE_FIXED, -} CGroupNetClassType; - struct CGroupDeviceAllow { LIST_FIELDS(CGroupDeviceAllow, device_allow); char *path; @@ -109,9 +88,6 @@ struct CGroupContext { CGroupDevicePolicy device_policy; LIST_HEAD(CGroupDeviceAllow, device_allow); - CGroupNetClassType netclass_type; - uint32_t netclass_id; - uint64_t tasks_max; bool delegate; @@ -123,7 +99,7 @@ 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(CGroupContext *c, CGroupMask mask, const char *path, uint32_t netclass_id, ManagerState state); +void cgroup_context_apply(CGroupContext *c, CGroupMask mask, const char *path, ManagerState state); CGroupMask cgroup_context_get_mask(CGroupContext *c); @@ -136,12 +112,12 @@ CGroupMask unit_get_siblings_mask(Unit *u); CGroupMask unit_get_members_mask(Unit *u); CGroupMask unit_get_subtree_mask(Unit *u); -vCGroupMask unit_get_target_mask(Unit *u); +CGroupMask unit_get_target_mask(Unit *u); CGroupMask unit_get_enable_mask(Unit *u); void unit_update_cgroup_members_masks(Unit *u); -har *unit_default_cgroup_path(Unit *u); +char *unit_default_cgroup_path(Unit *u); int unit_set_cgroup_path(Unit *u, const char *path); int unit_realize_cgroup(Unit *u); @@ -151,10 +127,7 @@ int unit_watch_cgroup(Unit *u); int unit_attach_pids_to_cgroup(Unit *u); -int unit_add_to_netclass_cgroup(Unit *u); -int unit_remove_from_netclass_cgroup(Unit *u); #endif // 0 - int manager_setup_cgroup(Manager *m); void manager_shutdown_cgroup(Manager *m, bool delete);