2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="sd_event_source_get_event" xmlns:xi="http://www.w3.org/2001/XInclude">
9 <title>sd_event_source_get_event</title>
10 <productname>systemd</productname>
14 <refentrytitle>sd_event_source_get_event</refentrytitle>
15 <manvolnum>3</manvolnum>
19 <refname>sd_event_source_get_event</refname>
21 <refpurpose>Retrieve the event loop of an event source</refpurpose>
26 <funcsynopsisinfo>#include <systemd/sd-event.h></funcsynopsisinfo>
29 <funcdef>sd_event* <function>sd_event_source_get_event</function></funcdef>
30 <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
37 <title>Description</title>
39 <para><function>sd_event_source_get_event()</function> may be used
40 to retrieve the event loop object the event source object specified
41 as <parameter>source</parameter> is associated with. The event
42 loop object is specified when creating an event source object with
44 <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>
46 <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
50 <title>Return Value</title>
52 <para>On success, <function>sd_event_source_get_event()</function>
53 returns the associated event loop object. On failure, it returns
54 <constant>NULL</constant>.</para>
57 <xi:include href="libsystemd-pkgconfig.xml" />
60 <title>History</title>
61 <para><function>sd_event_source_get_event()</function> was added in version 229.</para>
65 <title>See Also</title>
68 <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
69 <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
70 <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
71 <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
72 <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
73 <citerefentry><refentrytitle>sd_event_add_inotify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
74 <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
75 <citerefentry><refentrytitle>sd_event_source_set_userdata</refentrytitle><manvolnum>3</manvolnum></citerefentry>