From 2c289ea8332a2c0777d8940058ff7a6293f59b6c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 24 Feb 2016 21:36:09 +0100 Subject: 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. --- src/core/manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/manager.h') 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); -- cgit v1.2.3-54-g00ecf