[systemd-devel] [PATCH 2/2] [POC] networkd: port to glib main loop
Tom Gundersen
teg at jklm.no
Mon Aug 25 14:24:48 PDT 2014
On Wed, Aug 20, 2014 at 7:08 PM, Simon McVittie
<simon.mcvittie at collabora.co.uk> wrote:
> On 20/08/14 16:28, Tom Gundersen wrote:
>> +int attach_sd_event_to_g_main_loop(GMainLoop *loop, sd_event *event) {
>
> (I know this is only a proof of concept but)
>
> I think the construct you're looking for is a GMainContext, not a GMainLoop:
>
> https://tecnocode.co.uk/2014/03/27/what-is-gmaincontext/
>
> (I know many event frameworks conflate the two.)
Thanks for the hint Simon.
I have now pushed an updated version of this example integration to my
private branch:
<http://cgit.freedesktop.org/~tomegun/systemd/tree/src/network/glib-event-glue.c?h=glib-sd-event>.
The necessary sd-event patch has also been pushed upstream.
As Lennart suggested, this should be included in the relevant
man-pages once we get them.
Cheers,
Tom
More information about the systemd-devel
mailing list