summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-bus/bus-common-errors.h
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2018-01-22 15:38:07 -0500
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:50:13 +0200
commit269ddd6aecc9307853384bfc44a22c9ade596f34 (patch)
tree83332cac02eded144f14025c409b651a494970f3 /src/libelogind/sd-bus/bus-common-errors.h
parent645c13d2553a301820ea8e065f7e1a3e69a489d1 (diff)
Add support for SD_EVENT_DEFAULT
Currently, sd-event supports the ability to have a thread-local default event loop. However, this is less useful than it can be since all functions which require an sd_event* as input require the caller to pass it. This patch adds a new macro which allows the developer to pass a constant SD_EVENT_DEFAULT instead. This reduces work for the caller. For example: r = sd_event_default(&e); r = sd_event_add_io(e, ...); sd_event_unref(e); Becomes: r = sd_event_add_io(SD_EVENT_DEFAULT, ...); If no thread-local default event loop exists, the function calls will return -ENOPKG. No event loop will ever be implicitly created.
Diffstat (limited to 'src/libelogind/sd-bus/bus-common-errors.h')
0 files changed, 0 insertions, 0 deletions