summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-29bus: use AM_CPPFLAGS to simplify preprocessor invocationSimon McVittie1-8/+9
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).
2011-07-29Simplify linking for tests that use libdbus-testutilsSimon McVittie4-24/+24
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.
2011-07-29Don't explicitly link thread and network libs into various testsSimon McVittie4-20/+16
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.
2011-07-29Rename DBUS_CLIENT_LIBS to LIBDBUS_LIBS to more accurately reflect its meaningSimon McVittie4-6/+6
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).
2011-07-29tools: simplify linkingSimon McVittie1-4/+13
* 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
2011-07-29tools: put bin_PROGRAMS one per line, eliminate unnecessary variableSimon McVittie1-4/+10
2011-07-29Move knowledge of what the bus daemon/launcher need to link into bus/Simon McVittie2-11/+15
2011-07-29Substitute cflags/libs per-librarySimon McVittie1-1/+10
This means each module can link whatever it needs to, localizing the knowledge of which module needs which libraries into its own Makefile.am.
2011-07-29Stop defining DBUS_API_SUBJECT_TO_CHANGESimon McVittie1-1/+1
Seriously.
2011-07-29dbus: remove export_symbols_internal, it will always be emptySimon McVittie1-6/+0
The whole point of libdbus-internal.la is that it exports all its symbols.
2011-07-29Simplify linking by moving -export-dynamic to AM_LDFLAGSSimon McVittie5-34/+25
2011-07-29Remove DBUS_GLIB_CFLAGS from name-test subdirectory (not used/needed)Simon McVittie1-1/+1
This appears to be left over from when dbus-glib was part of dbus.
2011-07-29Remove DBUS_CLIENT_CFLAGS, which is always emptySimon McVittie4-5/+2
2011-07-29Remove DBUS_TEST_CFLAGS, which is emptySimon McVittie3-4/+2
2011-07-29Remove leftover reference to dbus-md5.[ch]Simon McVittie1-3/+0
2011-07-29Remove declarations for tests that no longer existSimon McVittie1-2/+0
2011-07-29Fix compilation for removal of link cacheSimon McVittie3-14/+4
2011-07-28Merge branch 'dbus-1.4'Lennart Poettering1-4/+0
2011-07-28sysdeps-unix: remove some redundant assignmentsLennart Poettering1-4/+0
2011-07-28Merge branch 'dbus-1.4'Lennart Poettering2-5/+15
2011-07-28activation: add /lib/dbus-1/system-services to the search path for servicesLennart Poettering2-5/+15
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).
2011-07-28_dbus_message_remove_counter: remove ability to return the linkSimon McVittie3-15/+5
Reviewed-by: Colin Walters <walters@verbum.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
2011-07-28Add a regression test that can reproduce fd.o #34393Simon McVittie2-16/+77
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
2011-07-28Remove the per-connection link cacheSimon McVittie1-50/+11
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
2011-07-28dbus_connection_dispatch: avoid freeing UnknownMethod reply until we unlockSimon McVittie1-4/+16
Reviewed-by: Colin Walters <walters@verbum.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393
2011-07-28_dbus_connection_peer_filter_unlocked_no_update: delay freeing replySimon McVittie1-41/+40
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
2011-07-28Don't finalize sent or dispatched messages while under the connection lockSimon McVittie2-13/+62
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
2011-07-28Don't inline the contents of _dbus_connection_unlockSimon McVittie1-6/+8
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
2011-07-28When attaching counters to messages, don't automatically notify callbacksSimon McVittie3-3/+23
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
2011-07-28Comment some places where it's OK to unref a message despite holding locksSimon McVittie2-0/+4
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
2011-07-28Add _dbus_counter_notify and call it after every adjustmentSimon McVittie3-6/+34
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
2011-07-28_dbus_connection_message_sent: rename to _unlockedSimon McVittie3-6/+6
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
2011-07-28dbus_bus_register: don't unref the messages with the lock heldSimon McVittie1-12/+11
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
2011-07-28Merge branch 'dbus-1.4'Simon McVittie1-0/+21
2011-07-28Add a note about bootstrapping new platforms to READMESimon McVittie1-0/+21
2011-07-28Upgrade the type system into its own top-level section of the specSimon McVittie1-19/+30
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>
2011-07-28Merge branch 'dbus-1.4'Simon McVittie11-227/+227
2011-07-28man pages: replace all unescaped hyphen/minus characters with \-Simon McVittie6-217/+217
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>
2011-07-28Fix spelling/grammatical mistakes detected by Debian's lintian(1)Simon McVittie5-10/+10
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284 Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-07-27Merge branch 'dbus-1.4'Simon McVittie1-2/+2
2011-07-27list_allows_user: fix debug output for groupsSascha Silbe1-2/+2
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-07-26Merge branch 'dbus-1.4'Simon McVittie3-23/+35
Conflicts: dbus/dbus-message.c
2011-07-26NEWSSimon McVittie1-4/+3
2011-07-26DBusMessage: always access refcount atomically, even for assertions/initial refSimon McVittie1-12/+14
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-26dbus-memory: use atomic accesses to block count, even for assertionsSimon McVittie1-7/+17
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-26Merge branch 'dbus-1.4'Simon McVittie6-33/+76
2011-07-26NEWSSimon McVittie1-3/+4
2011-07-25DBusConnection: use atomic accesses to refcount in assertions/initial refSimon McVittie1-5/+6
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-25dbus_message_ref: avoid unused variable if not assertingSimon McVittie1-1/+7
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-25_dbus_connection_close_if_only_one_ref: use _dbus_atomic_getSimon McVittie1-13/+5
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005