dbus/test/name-test
Simon McVittie 2b3272c75a Make taking a global lock automatically initialize locking if needed
This lets them be thread-safe by default, at the cost that they can
now fail.

init_uninitialized_locks() and init_global_locks() must now both
reimplement the equivalent of _dbus_register_shutdown_func(), by using
_dbus_platform_rmutex_lock() on the same underlying mutex around a call
to _dbus_register_shutdown_func_unlocked().

This is because if they used the usual _DBUS_LOCK() API (as
_dbus_register_shutdown_func() does), it would automatically try to
initialize global locking, leading to infinite recursion.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-17 17:00:00 +01:00
..
.gitignore Add autolaunch test to .gitignore 2011-01-06 17:35:35 +00:00
Makefile.am Merge branch 'dbus-1.4' 2011-09-21 11:39:32 +01:00
run-test-systemserver.sh Check for Python; skip Python tests if not found 2011-09-21 11:25:48 +01:00
run-test.sh Check for Python; skip Python tests if not found 2011-09-21 11:25:48 +01:00
test-activation-forking.py Ignore exit code zero from activated services 2010-01-28 17:01:24 -05:00
test-autolaunch.c Include config.h as the first thing in every .c file 2013-02-22 13:08:27 +00:00
test-ids.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
test-pending-call-dispatch.c Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication method 2012-04-12 10:53:50 -04:00
test-pending-call-timeout.c Avoid using monotonic time in the DBUS_COOKIE_SHA1 authentication method 2012-04-12 10:53:50 -04:00
test-privserver-client.c Remove various never-used variables 2011-08-05 12:26:51 +01:00
test-privserver.c Port test-privserver to windows by using the TEST_LISTEN bus address. 2010-04-13 21:15:41 +02:00
test-shutdown.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
test-threads-init.c Make taking a global lock automatically initialize locking if needed 2013-06-17 17:00:00 +01:00
test-wait-for-echo.py Bug 18229: Allow signals 2008-12-09 10:17:36 -05:00
tmp-session-like-system.conf Clean up and clarify default system policy 2008-12-18 15:34:24 -05:00