- DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK |
- DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK |
- DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK |
- DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK |
- DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK |
- DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK |
- DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK |
- DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK |
- DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK|
- DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK,
- NULL, NULL, NULL, NULL,
- _dbus_pthread_condvar_new,
- _dbus_pthread_condvar_free,
- _dbus_pthread_condvar_wait,
- _dbus_pthread_condvar_wait_timeout,
- _dbus_pthread_condvar_wake_one,
- _dbus_pthread_condvar_wake_all,
- _dbus_pthread_mutex_new,
- _dbus_pthread_mutex_free,
- _dbus_pthread_mutex_lock,
- _dbus_pthread_mutex_unlock
+ pthread_mutex_unlock (&init_mutex);
+}
+
+#ifdef DBUS_HAVE_STATIC_RECURSIVE_MUTEXES
+
+static pthread_mutex_t global_locks[] = {
+ /* 0-4 */
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ /* 5-9 */
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ /* 10-11 */
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP