summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-22 07:06:16 +0900
committerLennart Poettering <lennart@poettering.net>2014-05-22 07:13:56 +0900
commitdb785129c9bce9294a118484cbc9bb6935ca34c2 (patch)
treea1c9508390cffe4eafc0592701ad566bba672b93 /src/core/manager.c
parent95ae05c0e79868c22b3e8e6fbc53432786876730 (diff)
cgroup: rework startup logic
Introduce a (unsigned long) -1 as "unset" state for cpu shares/block io weights, and keep the startup unit set around all the time.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 65e7b2604d..297574641c 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2452,7 +2452,6 @@ void manager_check_finished(Manager *m) {
usec_t firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec;
Unit *u = NULL;
Iterator i;
- UnitActiveState state;
assert(m);
@@ -2540,13 +2539,8 @@ void manager_check_finished(Manager *m) {
NULL);
}
- SET_FOREACH(u, m->startup_units, i) {
- u = set_steal_first(m->startup_units);
- state = unit_active_state(u);
- if (!UNIT_IS_ACTIVE_OR_ACTIVATING(state))
- continue;
- cgroup_context_apply(m, unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path);
- }
+ SET_FOREACH(u, m->startup_units, i)
+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);