diff options
author | Tom Gundersen <teg@jklm.no> | 2015-03-14 11:47:35 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-03-14 12:17:24 +0100 |
commit | 2b0c9ef7352dae53ee746c32033999c1346633b3 (patch) | |
tree | 08a1c6f8f246a5e4b78f5293770f1372c54938d2 /src/libsystemd | |
parent | f5ce2b49585a14cefb6d02f61c8dcdf7628a8605 (diff) |
sd-event: rename PASSIVE/PREPARED to INITIAL/ARMED
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 618d1b915c..2529a86233 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2234,7 +2234,7 @@ static int dispatch_exit(sd_event *e) { r = source_dispatch(p); - e->state = SD_EVENT_PASSIVE; + e->state = SD_EVENT_INITIAL; sd_event_unref(e); return r; @@ -2303,7 +2303,7 @@ _public_ int sd_event_prepare(sd_event *e) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); + assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); if (e->exit_requested) goto pending; @@ -2337,15 +2337,15 @@ _public_ int sd_event_prepare(sd_event *e) { if (event_next_pending(e) || e->need_process_child) goto pending; - e->state = SD_EVENT_PREPARED; + e->state = SD_EVENT_ARMED; return 0; pending: - e->state = SD_EVENT_PREPARED; + e->state = SD_EVENT_ARMED; r = sd_event_wait(e, 0); if (r == 0) - e->state = SD_EVENT_PREPARED; + e->state = SD_EVENT_ARMED; return r; } @@ -2358,7 +2358,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(e->state == SD_EVENT_PREPARED, -EBUSY); + assert_return(e->state == SD_EVENT_ARMED, -EBUSY); if (e->exit_requested) { e->state = SD_EVENT_PENDING; @@ -2446,7 +2446,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { r = 0; finish: - e->state = SD_EVENT_PASSIVE; + e->state = SD_EVENT_INITIAL; return r; } @@ -2469,14 +2469,14 @@ _public_ int sd_event_dispatch(sd_event *e) { e->state = SD_EVENT_RUNNING; r = source_dispatch(p); - e->state = SD_EVENT_PASSIVE; + e->state = SD_EVENT_INITIAL; sd_event_unref(e); return r; } - e->state = SD_EVENT_PASSIVE; + e->state = SD_EVENT_INITIAL; return 1; } @@ -2487,7 +2487,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); assert_return(e->state != SD_EVENT_FINISHED, -ESTALE); - assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); + assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); r = sd_event_prepare(e); if (r > 0) @@ -2507,7 +2507,7 @@ _public_ int sd_event_loop(sd_event *e) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); - assert_return(e->state == SD_EVENT_PASSIVE, -EBUSY); + assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); sd_event_ref(e); |