[systemd-devel] sd_event_run
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Sat Apr 11 16:52:10 PDT 2015
On Fri, Apr 10, 2015 at 06:14:40PM +0200, Lennart Poettering wrote:
> On Sat, 14.03.15 12:19, Tom Gundersen (teg at jklm.no) wrote:
>
> > > 1. shouldn't SD_EVENT_PASSIVE become SD_EVENT_INITIAL? "passive" seems strange
> > > in this context.
>
> I found it weird to name this INITIAL (or "INIT" or something like
> that) since we would return to it every single iteration... For me
> "init" kinda implies it's something "fresh", "unused", and hence not
> really something we routinely come back to...
In a sense it is "fresh" and "unused", because the state after doing
an interation of the loop is exactly the same as if the loop never run.
(E.g. I don't think it would be wrong to say "I cleaned the couch and
restored it to its initial state", even though it obviously has been used.)
"Passive" was confusing, so "initial", even if imperfect, seems an
improvement. We really want to say "the state in which you started",
without implying whether we have been there the whole time or not.
I don't know if there's a better word.
> > > Similarly, SD_EVENT_ARMED seems more self-explanatory than PREPARED.
> > > (I don't like PREPARED because it is not obvious whether sources are
> > > prepared to wait on, or events are prepared to be reaped.)
>
> I called this "prepared" since it what's _prepare() is supposed to get
> into...
>
> But ARMED is fine too...
We really should get some native speakers to help out with this :)
Maybe sd_event_prepare should be renamed to sd_event_arm?
Zbyszek
More information about the systemd-devel
mailing list