1SD_EVENT_SOURCE_GET_PENDINGs(d3_)event_source_get_penSdDi_nEgVENT_SOURCE_GET_PENDING(3)
2
3
4

NAME

6       sd_event_source_get_pending - Determine pending state of event sources
7

SYNOPSIS

9       #include <systemd/sd-event.h>
10
11       int sd_event_source_get_pending(sd_event_source *source);
12

DESCRIPTION

14       sd_event_source_get_pending() may be used to determine whether the
15       event source object specified as source has seen events but has not
16       been dispatched yet (and thus is marked "pending").
17
18       Event source objects initially are not marked pending, when they are
19       created with calls such as sd_event_add_io(3), sd_event_add_time(3),
20       with the exception of those created with sd_event_add_defer(3) which
21       are immediately marked pending, and sd_event_add_exit(3) for which the
22       "pending" concept is not defined. For details see the respective manual
23       pages.
24
25       In each event loop iteration one event source of those marked pending
26       is dispatched, in the order defined by the event source priority, as
27       set with sd_event_source_set_priority(3).
28
29       For I/O event sources, as created with sd_event_add_io(3), the call
30       sd_event_source_get_io_revents(3) may be used to query the type of
31       event pending in more detail.
32

RETURN VALUE

34       On success, sd_event_source_get_pending() returns an integer greater
35       than zero when the event source is marked pending, and zero when the
36       event source is not marked pending. On failure, it returns a negative
37       errno-style error code.
38

ERRORS

40       Returned errors may indicate the following problems:
41
42       -EINVAL
43           source is not a valid pointer to an sd_event_source object.
44
45       -EDOM
46           source refers to an event source object created with
47           sd_event_add_exit(3).
48
49       -ENOMEM
50           Not enough memory.
51
52       -ESTALE
53           The event loop is already terminated.
54
55       -ECHILD
56           The event loop has been created in a different process.
57

NOTES

59       These APIs are implemented as a shared library, which can be compiled
60       and linked to with the libsystemd pkg-config(1) file.
61

SEE ALSO

63       sd-event(3), sd_event_add_io(3), sd_event_add_time(3),
64       sd_event_add_child(3), sd_event_add_signal(3), sd_event_add_defer(3),
65       sd_event_source_unref(3)
66
67
68
69systemd 239                                     SD_EVENT_SOURCE_GET_PENDING(3)
Impressum