X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fsd_event_new.xml;h=bd495b63bf33512f9075203f78aae64a42891494;hp=f25631f9caa74ca060c744da453d41c7f5bbfebd;hb=edc501d4674dadc304d45a7e1c5b69e207eb8cd4;hpb=dca348bcbb462305864526c587495a14a76bfcde diff --git a/man/sd_event_new.xml b/man/sd_event_new.xml index f25631f9c..bd495b63b 100644 --- a/man/sd_event_new.xml +++ b/man/sd_event_new.xml @@ -83,24 +83,24 @@ along with systemd; If not, see . sd_event_new() allocates a new event loop object. The event loop object is returned in the - event parameter. After use drop + event parameter. After use, drop the returned reference with sd_event_unref(). When the last reference is - dropped the event loop is freed. + dropped, the event loop is freed. sd_event_default() acquires a reference to the default event loop object of the calling thread, possibly allocating a new object if no default event loop object has been - allocated yet for the thread. After use drop the returned + allocated yet for the thread. After use, drop the returned reference with sd_event_unref(). When the - last reference is dropped the event loop is freed. If this + last reference is dropped, the event loop is freed. If this function is called while the object returned from a previous call from the same thread is still referenced, the same object is returned again, but the reference is increased by one. It is recommended to use this call instead of sd_event_new() in order to share event loop objects between various components that are dispatched in the same - thread. All threads either have no or one default event loops + thread. All threads either have exactly zero or one default event loop associated, but never more. sd_event_ref() increases the reference @@ -108,13 +108,13 @@ along with systemd; If not, see . sd_event_unref() decreases the reference counter of the specified event loop object by one. If - the counter hits zero the event loop object is freed. Note that it + the counter hits zero, the event loop object is freed. Note that it is freed regardless of whether it is the default event loop object for a thread or not. This means that allocating an event loop with - sd_event_default(), then releasing it and + sd_event_default(), then releasing it, and then acquiring a new one with sd_event_default() will result in two - distinct objects. Note that in order to free an event loop object + distinct objects. Note that, in order to free an event loop object, all remaining event sources of the event loop also need to be freed as they each keep a reference to it. @@ -158,7 +158,7 @@ along with systemd; If not, see . sd_event_new() and the other functions described here are available as a shared library, which can be compiled and linked to with the - libsystemd pkg-config1 + libsystemd pkg-config1 file.