diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-04-16 12:07:23 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-05-10 11:35:08 +0100 |
commit | 17a23d08b51cf21a2110047649a86445e99e2b3f (patch) | |
tree | 127ee33f09bab2955a07fd22e81781f0f79a2720 /cmake | |
parent | 863c989bb631d7063597db30fe8add3233cca7fd (diff) | |
download | dbus-17a23d08b51cf21a2110047649a86445e99e2b3f.tar.gz |
dbus_threads_init_default, dbus_threads_init: be safe to call at any time
On Unix, we use a pthreads mutex, which can be allocated and
initialized in global memory.
On Windows, we use a CRITICAL_SECTION, together with a call to
InitializeCriticalSection() from the constructor of a global static
C++ object (thanks to Ralf Habacker for suggesting this approach).
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: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/dbus/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index f70711af..6b2d0635 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -186,6 +186,7 @@ set (DBUS_UTIL_HEADERS if (WIN32) set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} ${DBUS_DIR}/dbus-file-win.c + ${DBUS_DIR}/dbus-init-win.cpp ${DBUS_DIR}/dbus-sysdeps-win.c ${DBUS_DIR}/dbus-pipe-win.c ${DBUS_DIR}/dbus-sysdeps-thread-win.c |