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>
Applied-upstream: 1.7.4, commit:
17a23d08b51cf21a2110047649a86445e99e2b3f
Bug-Tizen: TZPC-1971
Reviewed-by: Anas Nashif <anas.nashif@intel.com>
Change-Id: Id6aa81b7d553965c4c6f511e2410673c2f222a66