summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-24 21:36:09 +0100
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:30 +0200
commit2c289ea8332a2c0777d8940058ff7a6293f59b6c (patch)
treeff77eb03f3e9a5f4e39c73b85d122f5abaa0ac45 /src/core/manager.h
parent463d0d15690c7abe2172a23ae23c5547693dd71f (diff)
core: introduce MANAGER_IS_RELOADING() macro
This replaces the old function call manager_is_reloading_or_reexecuting() which was used only at very few places. Use the new macro wherever we check whether we are reloading. This should hopefully make things a bit more readable, given the nature of Manager:n_reloading being a counter.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 19eab958ea..17f84e6963 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -306,6 +306,8 @@ struct Manager {
#define MANAGER_IS_SYSTEM(m) ((m)->unit_file_scope == UNIT_FILE_SYSTEM)
#define MANAGER_IS_USER(m) ((m)->unit_file_scope != UNIT_FILE_SYSTEM)
+#define MANAGER_IS_RELOADING(m) ((m)->n_reloading > 0)
+
int manager_new(UnitFileScope scope, bool test_run, Manager **m);
Manager* manager_free(Manager *m);
@@ -344,8 +346,6 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds);
int manager_reload(Manager *m);
-bool manager_is_reloading_or_reexecuting(Manager *m) _pure_;
-
void manager_reset_failed(Manager *m);
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success);