unit: rework trigger dependency logic

Instead of having explicit type-specific callbacks that inform the
triggering unit when a triggered unit changes state, make this generic
so that state changes are forwarded betwee any triggered and triggering
unit.

Also, get rid of UnitRef references from automount, timer, path units,
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
dendencies.
This commit is contained in:
Lennart Poettering
2013-04-23 16:00:32 -03:00
parent a34cb32e54
commit 3ecaa09bcc
14 changed files with 170 additions and 217 deletions
-3
View File
@@ -74,7 +74,6 @@ struct Timer {
usec_t next_elapse_realtime;
TimerState state, deserialized_state;
UnitRef unit;
Watch monotonic_watch;
Watch realtime_watch;
@@ -82,8 +81,6 @@ struct Timer {
TimerResult result;
};
void timer_unit_notify(Unit *u, UnitActiveState new_state);
void timer_free_values(Timer *t);
extern const UnitVTable timer_vtable;