diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-19 23:33:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-19 23:36:03 +0100 |
commit | 0be6c2f617732902921d42bb0705f016b2838aba (patch) | |
tree | 73f951a9172c7772dcd456820099b8ea236bd2cc /src/libsystemd | |
parent | 6680dd6b66e8a3e116819122ef66d89846d95f58 (diff) |
sd-event: define a new PREPARING state
We already have a state RUNNING and EXITING when we dispatch regular and
exit callbacks. Let's introduce a new state called PREPARING that is
active while we invoke preparation callbacks. This way we have a state
each for all three kinds of event handlers.
The states are currently not documented, hence let's add a new state to
the end, before we start documenting this.
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index e68d76708a..e8e3d7306f 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2437,7 +2437,9 @@ _public_ int sd_event_prepare(sd_event *e) { e->iteration++; + e->state = SD_EVENT_PREPARING; r = event_prepare(e); + e->state = SD_EVENT_INITIAL; if (r < 0) return r; |