X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=unit.h;h=72a742ca4a1f4db24b5580b9f0005d722a4da87e;hp=9155b2eda1db148e0db219234d1c53fb0c957f53;hb=a06b0b562bc11e5ca2ea88074fb3b38f2503ed6b;hpb=701cc384c283206a29b21e4e7302e5cf5f2d9433 diff --git a/unit.h b/unit.h index 9155b2eda..72a742ca4 100644 --- a/unit.h +++ b/unit.h @@ -61,6 +61,7 @@ enum UnitType { UNIT_AUTOMOUNT, UNIT_SNAPSHOT, UNIT_TIMER, + UNIT_SWAP, _UNIT_TYPE_MAX, _UNIT_TYPE_INVALID = -1 }; @@ -170,7 +171,7 @@ struct Meta { LIST_FIELDS(Meta, gc_queue); /* Used during GC sweeps */ - int gc_marker; + unsigned gc_marker; /* If we go down, pull down everything that depends on us, too */ bool recursive_stop; @@ -194,6 +195,7 @@ struct Meta { #include "mount.h" #include "automount.h" #include "snapshot.h" +#include "swap.h" union Unit { Meta meta; @@ -205,6 +207,7 @@ union Unit { Mount mount; Automount automount; Snapshot snapshot; + Swap swap; }; struct UnitVTable { @@ -306,6 +309,9 @@ struct UnitVTable { /* Exclude from automatic gc */ bool no_gc:1; + + /* Exclude from isolation requests */ + bool no_isolate:1; }; extern const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX]; @@ -332,6 +338,7 @@ DEFINE_CAST(DEVICE, Device); DEFINE_CAST(MOUNT, Mount); DEFINE_CAST(AUTOMOUNT, Automount); DEFINE_CAST(SNAPSHOT, Snapshot); +DEFINE_CAST(SWAP, Swap); Unit *unit_new(Manager *m); void unit_free(Unit *u);