1SD_BUS_SLOT_REF(3)              sd_bus_slot_ref             SD_BUS_SLOT_REF(3)
2
3
4

NAME

6       sd_bus_slot_ref, sd_bus_slot_unref, sd_bus_slot_unrefp - Create and
7       destroy references to a bus slot object
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       sd_bus_slot *sd_bus_slot_ref(sd_bus_slot *slot);
13
14       sd_bus_slot *sd_bus_slot_unref(sd_bus_slot *slot);
15
16       void sd_bus_slot_unrefp(sd_bus_slot **slotp);
17

DESCRIPTION

19       sd_bus_slot_ref() increases the reference counter of slot by one.
20
21       sd_bus_slot_unref() decreases the reference counter of slot by one.
22       Once the reference count has dropped to zero, slot object is destroyed
23       and cannot be used anymore, so further calls to sd_bus_slot_ref() or
24       sd_bus_slot_unref() are illegal.
25
26       sd_bus_slot_unrefp() is similar to sd_bus_slot_unref() but takes a
27       pointer to a pointer to an sd_bus_slot object. This call is useful in
28       conjunction with GCC's and LLVM's Clean-up Variable Attribute[1]. See
29       sd_bus_new(3) for an example how to use the cleanup attribute.
30
31       sd_bus_slot_ref() and sd_bus_slot_unref() execute no operation if the
32       passed in bus object address is NULL.  sd_bus_slot_unrefp() will first
33       dereference its argument, which must not be NULL, and will execute no
34       operation if that is NULL.
35

RETURN VALUE

37       sd_bus_slot_ref() always returns the argument.
38
39       sd_bus_slot_unref() always returns NULL.
40

NOTES

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

SEE ALSO

46       systemd(1), sd-bus(3), sd_bus_new(3), sd_bus_message_new(3),
47       sd_bus_call_method_async(3)
48

NOTES

50        1. Clean-up Variable Attribute
51           https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
52
53
54
55systemd 249                                                 SD_BUS_SLOT_REF(3)
Impressum