diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-08-26 16:17:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-26 16:17:05 +0300 |
commit | 6afe14ff5b91e62072005dd8eb75315a16989874 (patch) | |
tree | 279f9cde40fe2d0ce2ebb85abe961147b2cc6837 /src/core/unit.h | |
parent | 0c582db0c6ec3330953270cf0324038cb6615617 (diff) | |
parent | 383034987de71927683dd34896ca7f3c9c259f7c (diff) |
Merge pull request #3984 from poettering/refcnt
permit bus clients to pin units to avoid automatic GC
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index f7a65782f1..3584c16d8c 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -108,6 +108,10 @@ struct Unit { /* The slot used for watching NameOwnerChanged signals */ sd_bus_slot *match_bus_slot; + /* References to this unit from clients */ + sd_bus_track *bus_track; + char **deserialized_refs; + /* Job timeout and action to take */ usec_t job_timeout; FailureAction job_timeout_action; @@ -190,6 +194,7 @@ struct Unit { /* Where the cpu.stat or cpuacct.usage was at the time the unit was started */ nsec_t cpu_usage_base; + nsec_t cpu_usage_last; /* the most recently read value */ /* Counterparts in the cgroup filesystem */ char *cgroup_path; @@ -247,6 +252,9 @@ struct Unit { /* Did we already invoke unit_coldplug() for this unit? */ bool coldplugged:1; + + /* For transient units: whether to add a bus track reference after creating the unit */ + bool bus_track_add:1; }; struct UnitStatusMessageFormats { |