mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
libs: gstcheck: check that mutex is locked before g_cond_wait*() is called
Sanity check to catch problems in unit test.
This commit is contained in:
parent
b2bbd1edfa
commit
ba31faf261
1 changed files with 2 additions and 0 deletions
|
@ -484,6 +484,8 @@ G_STMT_START { \
|
|||
G_STMT_START { \
|
||||
/* synchronize everyone */ \
|
||||
GST_DEBUG ("THREAD %p: syncing", g_thread_self ()); \
|
||||
fail_if (g_mutex_trylock (&mutex), \
|
||||
"bug in unit test, mutex should be locked at this point");\
|
||||
g_cond_wait (&sync_cond, &mutex); \
|
||||
GST_DEBUG ("THREAD %p: synced", g_thread_self ()); \
|
||||
g_mutex_unlock (&mutex); \
|
||||
|
|
Loading…
Reference in a new issue