summaryrefslogtreecommitdiff
path: root/src/initctl
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-15 18:49:29 +0200
committerTom Gundersen <teg@jklm.no>2014-08-25 21:52:36 +0200
commitc45a5a74465a39280b855f9d720b2ab4779a47fa (patch)
treed345eb690e78dbd03093bea93932a2bf87cffac3 /src/initctl
parent41a451cc2901a5deb985aea4cc8de204a22e5612 (diff)
sd-event: split run into prepare/wait/dispatch
This will allow sd-event to be integrated into an external event loop, which in turn will allow (say) glib-based applications to use our various libraries, without manually integrating each of them (bus, rtnl, dhcp, ...). The external event-loop should integrate sd-event int he following way: Every iteration must start with a call to sd_event_prepare(), which will return 0 if no event sources are ready to be processed, a positive value if they are and a negative value on error. sd_event_prepare() may only be called following sd_event_dispatch(); a call to sd_event_wait() indicating that no sources are ready to be dispatched; or a failed call to sd_event_dispatch() or sd_event_wait(). A successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched must be followed by a call to sd_event_wait(), which will return 0 if it timed out without event sources being ready to be processed, a negative value on error and a positive value otherwise. sd_event_wait() may only be called following a successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched. If sd_event_wait() indicates that some events sources are ready to be dispatched, it must be followed by a call to sd_event_dispatch(). This is the only time sd_event_dispatch() may be called.
Diffstat (limited to 'src/initctl')
0 files changed, 0 insertions, 0 deletions