Windows implementation of _dbus_platform_rmutex_lock() does not match the expectations of the client code
The unix variant of _dbus_platform_rmutex_lock() is implemented as
void
_dbus_platform_rmutex_lock (DBusRMutex *mutex)
{
PTHREAD_CHECK ("pthread_mutex_lock", pthread_mutex_lock (&mutex->lock));
}
It asserts in any error case and let client code simple use
_dbus_platform_rmutex_lock (mutex)
/* protected access */
_dbus_platform_rmutex_unlock (mutex)
This behavior is not not implemented in the Windows code:
void
_dbus_platform_rmutex_lock (DBusRMutex *mutex)
{
WaitForSingleObject ((HANDLE *) mutex, INFINITE);
}
which can lead to threading problems, such as those reported at #368 (closed).