Debian Codegraph @

upstream/debian-unstable/man3/sd_event_source_get_event.3

raw
1 '\" t
2 .TH "SD_EVENT_SOURCE_GET_EVENT" "3" "" "systemd 261~rc3" "sd_event_source_get_event"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_event_source_get_event \- Retrieve the event loop of an event source
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-event\&.h>
29 .fi
30 .ft
31 .HP \w'sd_event*\ sd_event_source_get_event('u
32 .BI "sd_event* sd_event_source_get_event(sd_event_source\ *" "source" ");"
33 .SH "DESCRIPTION"
34 .PP
35 \fBsd_event_source_get_event()\fR
36 may be used to retrieve the event loop object the event source object specified as
37 \fIsource\fR
38 is associated with\&. The event loop object is specified when creating an event source object with calls such as
39 \fBsd_event_add_io\fR(3)
40 or
41 \fBsd_event_add_time\fR(3)\&.
42 .SH "RETURN VALUE"
43 .PP
44 On success,
45 \fBsd_event_source_get_event()\fR
46 returns the associated event loop object\&. On failure, it returns
47 \fBNULL\fR\&.
48 .SH "NOTES"
49 .PP
50 Functions described here are available as a shared library, which can be compiled against and linked to with the
51 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
52 file\&.
53 .PP
54 The code described here uses
55 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
56 \fBsetenv\fR(3)
57 from a parallel thread\&. It is recommended to only do calls to
58 \fBsetenv()\fR
59 from an early phase of the program when no other threads have been started\&.
60 .SH "HISTORY"
61 .PP
62 \fBsd_event_source_get_event()\fR
63 was added in version 229\&.
64 .SH "SEE ALSO"
65 .PP
66 \fBsd-event\fR(3), \fBsd_event_add_io\fR(3), \fBsd_event_add_time\fR(3), \fBsd_event_add_signal\fR(3), \fBsd_event_add_child\fR(3), \fBsd_event_add_inotify\fR(3), \fBsd_event_add_defer\fR(3), \fBsd_event_source_set_userdata\fR(3)