Age | Commit message (Collapse) | Author | Files | Lines |
|
Everything in this directory is statically linked to libdbus-internal,
so we can make -DDBUS_STATIC_BUILD global. Also, merge INCLUDES into
AM_CPPFLAGS (it's an older name for the same functionality).
|
|
This is the library used by tests that link libdbus-internal and DBusLoop.
By linking libdbus-internal into it, we can avoid having to repeat that
dependency all over the place - libtool and cmake both know how to follow
recursive dependencies.
In cmake, also use libdbus-testutils for more tests, in preference to
repeating its source files.
|
|
These tests get everything they need from the public or internal API of
libdbus-internal.la, and libtool knows how to pull in libraries'
dependencies, so we don't need explicit linking.
spawn-test and break-loader don't actually need test-utils.[ch]
either.
|
|
This does still need to be in configure.ac, because it's common to
dbus/Makefile.am (linking the static/shared library) and dbus-1*.pc.in
(telling static library users which additional libraries they must link).
|
|
* dbus-send, dbus-uuidgen only need to link libdbus; libtool knows what
extra libraries libdbus depends on
* dbus-monitor uses a Winsock header (on Windows) so it needs
NETWORK_libs,but still doesn't need threads
* dbus-launch needs X (on Unix) but doesn't directly need threads or
networking
|
|
|
|
|
|
This means each module can link whatever it needs to, localizing the
knowledge of which module needs which libraries into its own
Makefile.am.
|
|
Seriously.
|
|
The whole point of libdbus-internal.la is that it exports all its symbols.
|
|
|
|
This appears to be left over from when dbus-glib was part of dbus.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In order to allow D-Bus usage during early boot (where /usr is not
accessible) also search for bus activation files in
/lib/dbus-1/system-services/. This is only a first step in the right
direction, before we really can boot without /usr we'd need to move all
current activation files (or possibly replace
/usr/dbus-1/system-services to a symlink to
/lib/dbus-1/system-services).
|
|
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
The number of messages is arbitrary; the more messages, the more likely
the crash is. 2000 messages seem to cause it reliably on this laptop,
but I've set it to 10000 to be safe.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
With fd.o#34393 fixed, retaking the lock to cache unused links
significantly adds to locking overhead (-18% throughput in a synthetic
benchmark on an ARM device). The cache is also unlimited in size, and
probably contributes to memory growth and fragmentation by not being
under the system malloc's control.
Fixing fd.o #34393, but also dropping this cache entirely, turns out to
lead to a 5% increase in throughput on the same synthetic benchmark.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
Finalizing the reply could conceivably call callbacks, so wait til we
unlock.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
Finalizing a message can trigger callbacks; that's bad, if we have a
connection locked.
In particular, if a message is received by the "left side", passed to
the "right side" and sent (as in test/relay.c (see the diagram there)
or in dbus-daemon), then finalizing that message could result in the
live messages counter for the left side, and the outgoing messages counter
for the right side, both being decremented while under either side's
lock.
After a message is dispatched on the left side, finalizing it now drops
the lock temporarily, to avoid this problem.
After a message is sent on the right side, finalizing it is now deferred
until the right side unlocks, by moving it to a new queue of
"expired messages" which is automatically cleared every time we release
the lock.
The "live messages" counter for the "left" connection will now explicitly
take the left connection's lock before decrementing, to avoid
manipulating watches without a lock.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
It's about to become more complex, to handle delayed deallocation of
messages in order to avoid triggering callbacks while locked.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
In all the places where counters are added, we're under a lock. The caller
knows what effect adding the counter might have, and can replicate it
in a lock-safe way if necessary.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
In general, dbus_message_unref should be avoided while holding locks,
because it can invoke arbitrary user callbacks (via attached data, or
via DBusCounter).
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
When fd-passing is implemented, adjustments happen in pairs; in that case
we coalesce the two calls into one.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
It's called with the connection's lock held.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
Finalizing a message can call out to user code via dbus_message_set_data
(or to internal code not expecting locks to be held, via DBusCounter).
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
|
|
|
|
|
|
The type system can be used independently, for instance in GVariant
(although GVariant's binary encoding is in fact not the same).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38252
Reviewed-by: Lennart Poettering <lennart@poettering.net>
|
|
|
|
In a man page, "-" officially means a typographical (Unicode) hyphen,
which frequently breaks the ability to copy and paste code examples from
a man page. "\-" means the ASCII hyphen/minus character. See
<http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html> for
more details.
Rather than trying to distinguish between hyphens, em-dashes and
hyphen/minus, I just replaced all ambiguous hyphens with \- by applying
this vim command repeatedly until it didn't find anything:
%s/\(^\|[^\\]\)-/\1\\-/g
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
|
|
|
|
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|
Conflicts:
dbus/dbus-message.c
|
|
|
|
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
|
|
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
|
|
|
|
|
|
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
|
|
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
|
|
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
|