summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-25 21:57:41 -0300
committerLennart Poettering <lennart@poettering.net>2013-04-25 22:01:49 -0300
commit31afa0a44c2d7f93d837c840cdbd623982ac165f (patch)
tree054b8f0aa7aabfe01f02db08286793eeef8b7159 /src/core/unit.h
parent67fb4482acb0ecccb8a30e7ca49e5de28ba49eaf (diff)
unit: rework stop pending logic
When a trigger unit wants to know if a stop is queued for it, we should just check precisely that and do not check whether it is actually stopped already. This is because we use these checks usually from state change calls where the state variables are not updated yet. This change splits unit_pending_inactive() into two calls unit_inactive_or_pending() and unit_stop_pending(). The former checks state and pending jobs, the latter only pending jobs.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 6bfe58c8bf..a086538c61 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -536,8 +536,9 @@ void unit_reset_failed(Unit *u);
Unit *unit_following(Unit *u);
-bool unit_pending_inactive(Unit *u);
-bool unit_pending_active(Unit *u);
+bool unit_stop_pending(Unit *u);
+bool unit_inactive_or_pending(Unit *u);
+bool unit_active_or_pending(Unit *u);
int unit_add_default_target_dependency(Unit *u, Unit *target);