chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: add new .slice unit type for partitioning systems
[elogind.git]
/
src
/
core
/
unit.h
diff --git
a/src/core/unit.h
b/src/core/unit.h
index b04475e4fb8351e605615b6db9d124cf1ba1aa32..81b8adbfdc7f43b6fb4b3e972a660affc2d70a44 100644
(file)
--- a/
src/core/unit.h
+++ b/
src/core/unit.h
@@
-118,6
+118,15
@@
enum UnitDependency {
#include "cgroup.h"
#include "cgroup-attr.h"
#include "cgroup.h"
#include "cgroup-attr.h"
+struct UnitRef {
+ /* Keeps tracks of references to a unit. This is useful so
+ * that we can merge two units if necessary and correct all
+ * references to them */
+
+ Unit* unit;
+ LIST_FIELDS(UnitRef, refs);
+};
+
struct Unit {
Manager *manager;
struct Unit {
Manager *manager;
@@
-168,6
+177,8
@@
struct Unit {
CGroupBonding *cgroup_bondings;
CGroupAttribute *cgroup_attributes;
CGroupBonding *cgroup_bondings;
CGroupAttribute *cgroup_attributes;
+ UnitRef slice;
+
/* Per type list */
LIST_FIELDS(Unit, units_by_type);
/* Per type list */
LIST_FIELDS(Unit, units_by_type);
@@
-240,15
+251,6
@@
struct Unit {
bool in_audit:1;
};
bool in_audit:1;
};
-struct UnitRef {
- /* Keeps tracks of references to a unit. This is useful so
- * that we can merge two units if necessary and correct all
- * references to them */
-
- Unit* unit;
- LIST_FIELDS(UnitRef, refs);
-};
-
struct UnitStatusMessageFormats {
const char *starting_stopping[2];
const char *finished_start_job[_JOB_RESULT_MAX];
struct UnitStatusMessageFormats {
const char *starting_stopping[2];
const char *finished_start_job[_JOB_RESULT_MAX];
@@
-265,6
+267,7
@@
struct UnitStatusMessageFormats {
#include "snapshot.h"
#include "swap.h"
#include "path.h"
#include "snapshot.h"
#include "swap.h"
#include "path.h"
+#include "slice.h"
struct UnitVTable {
/* How much memory does an object of this unit type need */
struct UnitVTable {
/* How much memory does an object of this unit type need */
@@
-433,6
+436,7
@@
DEFINE_CAST(AUTOMOUNT, Automount);
DEFINE_CAST(SNAPSHOT, Snapshot);
DEFINE_CAST(SWAP, Swap);
DEFINE_CAST(PATH, Path);
DEFINE_CAST(SNAPSHOT, Snapshot);
DEFINE_CAST(SWAP, Swap);
DEFINE_CAST(PATH, Path);
+DEFINE_CAST(SLICE, Slice);
Unit *unit_new(Manager *m, size_t size);
void unit_free(Unit *u);
Unit *unit_new(Manager *m, size_t size);
void unit_free(Unit *u);
@@
-474,6
+478,8
@@
int unit_load_fragment_and_dropin(Unit *u);
int unit_load_fragment_and_dropin_optional(Unit *u);
int unit_load(Unit *unit);
int unit_load_fragment_and_dropin_optional(Unit *u);
int unit_load(Unit *unit);
+int unit_add_default_slice(Unit *u);
+
const char *unit_description(Unit *u) _pure_;
bool unit_has_name(Unit *u, const char *name);
const char *unit_description(Unit *u) _pure_;
bool unit_has_name(Unit *u, const char *name);