diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-04-15 13:54:39 +0100 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-06-19 06:07:33 -0400 |
commit | eca0cd54f16c94e36722735ac8d111da671b8185 (patch) | |
tree | 89c683724fb5f2a497f1930550438510881dbed9 | |
parent | bb50ec03725b9f94dcca18d1c1256c253e9d0198 (diff) | |
download | dbus-eca0cd54f16c94e36722735ac8d111da671b8185.tar.gz dbus-eca0cd54f16c94e36722735ac8d111da671b8185.tar.bz2 dbus-eca0cd54f16c94e36722735ac8d111da671b8185.zip |
dbus_threads_init: call _dbus_threads_init_platform_specific()
This reverses the relationship between these two functions.
Previously, dbus_threads_init() wouldn't allocate dbus_cond_event_tls
on Windows, call check_monotonic_clock on Unix, or call
_dbus_check_setuid on Unix.
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:eabf6c42a1b779f57f2c08d35772035788657579
Bug-Tizen: TZPC-1971
Change-Id: Ice70cf1f3e2202b72016daf619c89206b96aac47
-rw-r--r-- | dbus/dbus-sysdeps-pthread.c | 3 | ||||
-rw-r--r-- | dbus/dbus-sysdeps-thread-win.c | 2 | ||||
-rw-r--r-- | dbus/dbus-threads.c | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/dbus/dbus-sysdeps-pthread.c b/dbus/dbus-sysdeps-pthread.c index c60457be..36a1e4bf 100644 --- a/dbus/dbus-sysdeps-pthread.c +++ b/dbus/dbus-sysdeps-pthread.c @@ -281,5 +281,6 @@ _dbus_threads_init_platform_specific (void) */ check_monotonic_clock (); (void) _dbus_check_setuid (); - return dbus_threads_init (NULL); + + return TRUE; } diff --git a/dbus/dbus-sysdeps-thread-win.c b/dbus/dbus-sysdeps-thread-win.c index e30e7b87..4c4442a6 100644 --- a/dbus/dbus-sysdeps-thread-win.c +++ b/dbus/dbus-sysdeps-thread-win.c @@ -269,6 +269,6 @@ _dbus_threads_init_platform_specific (void) return FALSE; } - return dbus_threads_init (NULL); + return TRUE; } diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index b464629a..e7f2eb74 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -584,7 +584,8 @@ dbus_threads_init (const DBusThreadFunctions *functions) if (thread_init_generation == _dbus_current_generation) return TRUE; - if (!init_locks ()) + if (!_dbus_threads_init_platform_specific() || + !init_locks ()) return FALSE; thread_init_generation = _dbus_current_generation; @@ -613,7 +614,7 @@ dbus_threads_init (const DBusThreadFunctions *functions) dbus_bool_t dbus_threads_init_default (void) { - return _dbus_threads_init_platform_specific (); + return dbus_threads_init (NULL); } @@ -624,7 +625,7 @@ dbus_threads_init_default (void) dbus_bool_t _dbus_threads_init_debug (void) { - return _dbus_threads_init_platform_specific(); + return dbus_threads_init (NULL); } #endif /* DBUS_BUILD_TESTS */ |