libs/gst/check/gstcheck.h: Allow check tests to use

Original commit message from CVS:
* libs/gst/check/gstcheck.h: Allow check tests to use
MAIN_START_THREADS()/MAIN_STOP_THREADS() multiple times. Also allows
CK_FORK=no to be used with multiple check test that use threads.
This commit is contained in:
Peter Kjellerstedt 2008-12-10 15:19:45 +00:00
parent 4a19260c75
commit 8b4dfd5a07
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2008-12-10 Peter Kjellerstedt <pkj@axis.com>
* libs/gst/check/gstcheck.h: Allow check tests to use
MAIN_START_THREADS()/MAIN_STOP_THREADS() multiple times. Also allows
CK_FORK=no to be used with multiple check test that use threads.
2008-12-09 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/gstutils.c: (gst_element_get_compatible_pad):

View file

@ -264,9 +264,11 @@ MAIN_SYNCHRONIZE();
G_STMT_START { \
_gst_check_threads_running = TRUE; \
\
mutex = g_mutex_new (); \
start_cond = g_cond_new (); \
sync_cond = g_cond_new (); \
if (mutex == NULL) { \
mutex = g_mutex_new (); \
start_cond = g_cond_new (); \
sync_cond = g_cond_new (); \
} \
} G_STMT_END;
#define MAIN_START_THREAD_FUNCTIONS(count, function, data) \
@ -307,6 +309,8 @@ G_STMT_START { \
/* join all threads */ \
GST_DEBUG ("MAIN: joining"); \
g_list_foreach (thread_list, (GFunc) g_thread_join, NULL); \
g_list_free (thread_list); \
thread_list = NULL; \
GST_DEBUG ("MAIN: joined"); \
} G_STMT_END;