VLC_THREAD_ASSERT ("destroying mutex");
#elif defined( WIN32 )
- assert (p_mutex->initialized);
+ assert (InterlockedExchange (&p_mutex->initialized, -1) == 1);
DeleteCriticalSection (&p_mutex->mutex);
#endif
/* FIXME: destroy the mutex some time... */
vlc_mutex_unlock (&super_mutex);
}
+ assert (InterlockedExchange (&p_mutex->initialized, 1) == 1);
EnterCriticalSection (&p_mutex->mutex);
#endif
VLC_THREAD_ASSERT ("unlocking mutex");
#elif defined( WIN32 )
+ assert (InterlockedExchange (&p_mutex->initialized, 1) == 1);
LeaveCriticalSection (&p_mutex->mutex);
#endif