|
|
9ab0c5 |
From cb1a8f709ff3c27fc9f43aa27f985131422795bc Mon Sep 17 00:00:00 2001
|
|
|
9ab0c5 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
9ab0c5 |
Date: Tue, 13 Feb 2018 10:50:13 +0100
|
|
|
9ab0c5 |
Subject: [PATCH] pid1: rename unit_check_gc to unit_may_gc
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
"check" is unclear: what is true, what is false? Let's rename to "can_gc" and
|
|
|
9ab0c5 |
revert the return value ("positive" values are easier to grok).
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
v2:
|
|
|
9ab0c5 |
- rename from unit_can_gc to unit_may_gc
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
(cherry picked from commit f2f725e5cc950e84ebfd09bd64bc01c0ebdb6734)
|
|
|
9ab0c5 |
(cherry picked from commit 1716821fc5b93667a0bf821b25905de00818aec9)
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
Related: #1729228
|
|
|
9ab0c5 |
---
|
|
|
9ab0c5 |
src/core/automount.c | 13 ++++++++-----
|
|
|
9ab0c5 |
src/core/manager.c | 2 +-
|
|
|
9ab0c5 |
src/core/mount.c | 9 ++++++---
|
|
|
9ab0c5 |
src/core/scope.c | 8 ++++----
|
|
|
9ab0c5 |
src/core/service.c | 8 ++++----
|
|
|
9ab0c5 |
src/core/socket.c | 6 +++---
|
|
|
9ab0c5 |
src/core/socket.h | 4 ++--
|
|
|
9ab0c5 |
src/core/swap.c | 9 ++++++---
|
|
|
9ab0c5 |
src/core/unit.c | 31 +++++++++++++++++--------------
|
|
|
9ab0c5 |
src/core/unit.h | 9 ++++-----
|
|
|
9ab0c5 |
10 files changed, 55 insertions(+), 44 deletions(-)
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/automount.c b/src/core/automount.c
|
|
|
9ab0c5 |
index 4678bdc7c9..7b9c4aaf1d 100644
|
|
|
9ab0c5 |
--- a/src/core/automount.c
|
|
|
9ab0c5 |
+++ b/src/core/automount.c
|
|
|
9ab0c5 |
@@ -936,13 +936,16 @@ static const char *automount_sub_state_to_string(Unit *u) {
|
|
|
9ab0c5 |
return automount_state_to_string(AUTOMOUNT(u)->state);
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-static bool automount_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+static bool automount_may_gc(Unit *u) {
|
|
|
9ab0c5 |
+ Unit *t;
|
|
|
9ab0c5 |
+
|
|
|
9ab0c5 |
assert(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- if (!UNIT_TRIGGER(u))
|
|
|
9ab0c5 |
- return false;
|
|
|
9ab0c5 |
+ t = UNIT_TRIGGER(u);
|
|
|
9ab0c5 |
+ if (!t)
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return UNIT_VTABLE(UNIT_TRIGGER(u))->check_gc(UNIT_TRIGGER(u));
|
|
|
9ab0c5 |
+ return UNIT_VTABLE(t)->may_gc(t);
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, void *userdata) {
|
|
|
9ab0c5 |
@@ -1115,7 +1118,7 @@ const UnitVTable automount_vtable = {
|
|
|
9ab0c5 |
.active_state = automount_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = automount_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = automount_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = automount_may_gc,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.reset_failed = automount_reset_failed,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/manager.c b/src/core/manager.c
|
|
|
9ab0c5 |
index 3bca61d0b1..9dfdd67860 100644
|
|
|
9ab0c5 |
--- a/src/core/manager.c
|
|
|
9ab0c5 |
+++ b/src/core/manager.c
|
|
|
9ab0c5 |
@@ -871,7 +871,7 @@ static void unit_gc_sweep(Unit *u, unsigned gc_marker) {
|
|
|
9ab0c5 |
if (u->in_cleanup_queue)
|
|
|
9ab0c5 |
goto bad;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- if (unit_check_gc(u))
|
|
|
9ab0c5 |
+ if (!unit_may_gc(u))
|
|
|
9ab0c5 |
goto good;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
u->gc_marker = gc_marker + GC_OFFSET_IN_PATH;
|
|
|
9ab0c5 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
|
9ab0c5 |
index c7aed2333f..8a25ebd163 100644
|
|
|
9ab0c5 |
--- a/src/core/mount.c
|
|
|
9ab0c5 |
+++ b/src/core/mount.c
|
|
|
9ab0c5 |
@@ -1180,12 +1180,15 @@ _pure_ static const char *mount_sub_state_to_string(Unit *u) {
|
|
|
9ab0c5 |
return mount_state_to_string(MOUNT(u)->state);
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-_pure_ static bool mount_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+_pure_ static bool mount_may_gc(Unit *u) {
|
|
|
9ab0c5 |
Mount *m = MOUNT(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
assert(m);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return m->from_proc_self_mountinfo;
|
|
|
9ab0c5 |
+ if (m->from_proc_self_mountinfo)
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
+
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
|
|
9ab0c5 |
@@ -1954,7 +1957,7 @@ const UnitVTable mount_vtable = {
|
|
|
9ab0c5 |
.active_state = mount_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = mount_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = mount_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = mount_may_gc,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.sigchld_event = mount_sigchld_event,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/scope.c b/src/core/scope.c
|
|
|
9ab0c5 |
index 29954ba285..e9b45aa3f8 100644
|
|
|
9ab0c5 |
--- a/src/core/scope.c
|
|
|
9ab0c5 |
+++ b/src/core/scope.c
|
|
|
9ab0c5 |
@@ -381,7 +381,7 @@ static int scope_deserialize_item(Unit *u, const char *key, const char *value, F
|
|
|
9ab0c5 |
return 0;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-static bool scope_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+static bool scope_may_gc(Unit *u) {
|
|
|
9ab0c5 |
assert(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
/* Never clean up scopes that still have a process around,
|
|
|
9ab0c5 |
@@ -392,10 +392,10 @@ static bool scope_check_gc(Unit *u) {
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, true);
|
|
|
9ab0c5 |
if (r <= 0)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return false;
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
static void scope_notify_cgroup_empty_event(Unit *u) {
|
|
|
9ab0c5 |
@@ -547,7 +547,7 @@ const UnitVTable scope_vtable = {
|
|
|
9ab0c5 |
.active_state = scope_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = scope_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = scope_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = scope_may_gc,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.sigchld_event = scope_sigchld_event,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/service.c b/src/core/service.c
|
|
|
9ab0c5 |
index 957c6f37cc..69ec916f2d 100644
|
|
|
9ab0c5 |
--- a/src/core/service.c
|
|
|
9ab0c5 |
+++ b/src/core/service.c
|
|
|
9ab0c5 |
@@ -2436,7 +2436,7 @@ static const char *service_sub_state_to_string(Unit *u) {
|
|
|
9ab0c5 |
return service_state_to_string(SERVICE(u)->state);
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-static bool service_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+static bool service_may_gc(Unit *u) {
|
|
|
9ab0c5 |
Service *s = SERVICE(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
assert(s);
|
|
|
9ab0c5 |
@@ -2446,9 +2446,9 @@ static bool service_check_gc(Unit *u) {
|
|
|
9ab0c5 |
if (cgroup_good(s) > 0 ||
|
|
|
9ab0c5 |
main_pid_good(s) > 0 ||
|
|
|
9ab0c5 |
control_pid_good(s) > 0)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return false;
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
_pure_ static bool service_check_snapshot(Unit *u) {
|
|
|
9ab0c5 |
@@ -3461,7 +3461,7 @@ const UnitVTable service_vtable = {
|
|
|
9ab0c5 |
.active_state = service_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = service_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = service_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = service_may_gc,
|
|
|
9ab0c5 |
.check_snapshot = service_check_snapshot,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.sigchld_event = service_sigchld_event,
|
|
|
9ab0c5 |
diff --git a/src/core/socket.c b/src/core/socket.c
|
|
|
9ab0c5 |
index efefe7ce5d..3e4cdd467f 100644
|
|
|
9ab0c5 |
--- a/src/core/socket.c
|
|
|
9ab0c5 |
+++ b/src/core/socket.c
|
|
|
9ab0c5 |
@@ -2269,12 +2269,12 @@ const char* socket_port_type_to_string(SocketPort *p) {
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-_pure_ static bool socket_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+_pure_ static bool socket_may_gc(Unit *u) {
|
|
|
9ab0c5 |
Socket *s = SOCKET(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
assert(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return s->n_connections > 0;
|
|
|
9ab0c5 |
+ return s->n_connections == 0;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
static int socket_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
|
|
|
9ab0c5 |
@@ -2713,7 +2713,7 @@ const UnitVTable socket_vtable = {
|
|
|
9ab0c5 |
.active_state = socket_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = socket_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = socket_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = socket_may_gc,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.sigchld_event = socket_sigchld_event,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/socket.h b/src/core/socket.h
|
|
|
9ab0c5 |
index a2e08998c0..cc1428b3f7 100644
|
|
|
9ab0c5 |
--- a/src/core/socket.h
|
|
|
9ab0c5 |
+++ b/src/core/socket.h
|
|
|
9ab0c5 |
@@ -114,8 +114,8 @@ struct Socket {
|
|
|
9ab0c5 |
ExecRuntime *exec_runtime;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
/* For Accept=no sockets refers to the one service we'll
|
|
|
9ab0c5 |
- activate. For Accept=yes sockets is either NULL, or filled
|
|
|
9ab0c5 |
- when the next service we spawn. */
|
|
|
9ab0c5 |
+ * activate. For Accept=yes sockets is either NULL, or filled
|
|
|
9ab0c5 |
+ * to refer to the next service we spawn. */
|
|
|
9ab0c5 |
UnitRef service;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
SocketState state, deserialized_state;
|
|
|
9ab0c5 |
diff --git a/src/core/swap.c b/src/core/swap.c
|
|
|
9ab0c5 |
index e71de4e657..1f69736aa3 100644
|
|
|
9ab0c5 |
--- a/src/core/swap.c
|
|
|
9ab0c5 |
+++ b/src/core/swap.c
|
|
|
9ab0c5 |
@@ -949,12 +949,15 @@ _pure_ static const char *swap_sub_state_to_string(Unit *u) {
|
|
|
9ab0c5 |
return swap_state_to_string(SWAP(u)->state);
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-_pure_ static bool swap_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+_pure_ static bool swap_may_gc(Unit *u) {
|
|
|
9ab0c5 |
Swap *s = SWAP(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
assert(s);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return s->from_proc_swaps;
|
|
|
9ab0c5 |
+ if (s->from_proc_swaps)
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
+
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
|
|
9ab0c5 |
@@ -1497,7 +1500,7 @@ const UnitVTable swap_vtable = {
|
|
|
9ab0c5 |
.active_state = swap_active_state,
|
|
|
9ab0c5 |
.sub_state_to_string = swap_sub_state_to_string,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- .check_gc = swap_check_gc,
|
|
|
9ab0c5 |
+ .may_gc = swap_may_gc,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
.sigchld_event = swap_sigchld_event,
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
diff --git a/src/core/unit.c b/src/core/unit.c
|
|
|
9ab0c5 |
index b004aa8fcd..1b8ec9a20e 100644
|
|
|
9ab0c5 |
--- a/src/core/unit.c
|
|
|
9ab0c5 |
+++ b/src/core/unit.c
|
|
|
9ab0c5 |
@@ -282,15 +282,19 @@ int unit_set_description(Unit *u, const char *description) {
|
|
|
9ab0c5 |
return 0;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-bool unit_check_gc(Unit *u) {
|
|
|
9ab0c5 |
+bool unit_may_gc(Unit *u) {
|
|
|
9ab0c5 |
UnitActiveState state;
|
|
|
9ab0c5 |
assert(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
+ /* Checks whether the unit is ready to be unloaded for garbage collection.
|
|
|
9ab0c5 |
+ * Returns true when the unit may be collected, and false if there's some
|
|
|
9ab0c5 |
+ * reason to keep it loaded. */
|
|
|
9ab0c5 |
+
|
|
|
9ab0c5 |
if (u->job)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
if (u->nop_job)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
state = unit_active_state(u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
@@ -303,22 +307,21 @@ bool unit_check_gc(Unit *u) {
|
|
|
9ab0c5 |
/* But we keep the unit object around for longer when it is
|
|
|
9ab0c5 |
* referenced or configured to not be gc'ed */
|
|
|
9ab0c5 |
if (state != UNIT_INACTIVE)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
if (UNIT_VTABLE(u)->no_gc)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
if (u->no_gc)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
if (u->refs)
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- if (UNIT_VTABLE(u)->check_gc)
|
|
|
9ab0c5 |
- if (UNIT_VTABLE(u)->check_gc(u))
|
|
|
9ab0c5 |
- return true;
|
|
|
9ab0c5 |
+ if (UNIT_VTABLE(u)->may_gc && !UNIT_VTABLE(u)->may_gc(u))
|
|
|
9ab0c5 |
+ return false;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- return false;
|
|
|
9ab0c5 |
+ return true;
|
|
|
9ab0c5 |
}
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
void unit_add_to_load_queue(Unit *u) {
|
|
|
9ab0c5 |
@@ -348,7 +351,7 @@ void unit_add_to_gc_queue(Unit *u) {
|
|
|
9ab0c5 |
if (u->in_gc_queue || u->in_cleanup_queue)
|
|
|
9ab0c5 |
return;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- if (unit_check_gc(u))
|
|
|
9ab0c5 |
+ if (!unit_may_gc(u))
|
|
|
9ab0c5 |
return;
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
LIST_PREPEND(gc_queue, u->manager->gc_queue, u);
|
|
|
9ab0c5 |
@@ -888,7 +891,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
|
|
|
9ab0c5 |
"%s\tActive Enter Timestamp: %s\n"
|
|
|
9ab0c5 |
"%s\tActive Exit Timestamp: %s\n"
|
|
|
9ab0c5 |
"%s\tInactive Enter Timestamp: %s\n"
|
|
|
9ab0c5 |
- "%s\tGC Check Good: %s\n"
|
|
|
9ab0c5 |
+ "%s\tMay GC: %s\n"
|
|
|
9ab0c5 |
"%s\tNeed Daemon Reload: %s\n"
|
|
|
9ab0c5 |
"%s\tTransient: %s\n"
|
|
|
9ab0c5 |
"%s\tSlice: %s\n"
|
|
|
9ab0c5 |
@@ -905,7 +908,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
|
|
|
9ab0c5 |
prefix, strna(format_timestamp(timestamp2, sizeof(timestamp2), u->active_enter_timestamp.realtime)),
|
|
|
9ab0c5 |
prefix, strna(format_timestamp(timestamp3, sizeof(timestamp3), u->active_exit_timestamp.realtime)),
|
|
|
9ab0c5 |
prefix, strna(format_timestamp(timestamp4, sizeof(timestamp4), u->inactive_enter_timestamp.realtime)),
|
|
|
9ab0c5 |
- prefix, yes_no(unit_check_gc(u)),
|
|
|
9ab0c5 |
+ prefix, yes_no(unit_may_gc(u)),
|
|
|
9ab0c5 |
prefix, yes_no(unit_need_daemon_reload(u)),
|
|
|
9ab0c5 |
prefix, yes_no(u->transient),
|
|
|
9ab0c5 |
prefix, strna(unit_slice_name(u)),
|
|
|
9ab0c5 |
diff --git a/src/core/unit.h b/src/core/unit.h
|
|
|
9ab0c5 |
index 091ef7596e..3f411a1793 100644
|
|
|
9ab0c5 |
--- a/src/core/unit.h
|
|
|
9ab0c5 |
+++ b/src/core/unit.h
|
|
|
9ab0c5 |
@@ -353,10 +353,9 @@ struct UnitVTable {
|
|
|
9ab0c5 |
* unit is in. */
|
|
|
9ab0c5 |
const char* (*sub_state_to_string)(Unit *u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
- /* Return true when there is reason to keep this entry around
|
|
|
9ab0c5 |
- * even nothing references it and it isn't active in any
|
|
|
9ab0c5 |
- * way */
|
|
|
9ab0c5 |
- bool (*check_gc)(Unit *u);
|
|
|
9ab0c5 |
+ /* Return false when there is a reason to prevent this unit from being gc'ed
|
|
|
9ab0c5 |
+ * even though nothing references it and it isn't active in any way. */
|
|
|
9ab0c5 |
+ bool (*may_gc)(Unit *u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
/* When the unit is not running and no job for it queued we
|
|
|
9ab0c5 |
* shall release its runtime resources */
|
|
|
9ab0c5 |
@@ -496,7 +495,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c);
|
|
|
9ab0c5 |
int unit_choose_id(Unit *u, const char *name);
|
|
|
9ab0c5 |
int unit_set_description(Unit *u, const char *description);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
-bool unit_check_gc(Unit *u);
|
|
|
9ab0c5 |
+bool unit_may_gc(Unit *u);
|
|
|
9ab0c5 |
|
|
|
9ab0c5 |
void unit_add_to_load_queue(Unit *u);
|
|
|
9ab0c5 |
void unit_add_to_dbus_queue(Unit *u);
|