mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
debugging session with wim
Original commit message from CVS: debugging session with wim
This commit is contained in:
parent
4e44ab15b5
commit
981f6185c5
1 changed files with 4 additions and 3 deletions
|
@ -108,11 +108,12 @@ do_cothread_context_init (void)
|
||||||
static void
|
static void
|
||||||
do_cothread_context_destroy (cothread_context *context)
|
do_cothread_context_destroy (cothread_context *context)
|
||||||
{
|
{
|
||||||
g_assert (g_thread_self() != context->main->thread);
|
g_assert (g_thread_self() == context->main->thread);
|
||||||
|
|
||||||
while (context->cothreads) {
|
while (context->cothreads) {
|
||||||
do_cothread_destroy ((cothread *) context->cothreads->data);
|
do_cothread_destroy ((cothread *) context->cothreads->data);
|
||||||
}
|
}
|
||||||
|
g_mutex_unlock (context->mutex);
|
||||||
g_mutex_free (context->mutex);
|
g_mutex_free (context->mutex);
|
||||||
|
|
||||||
g_free (context);
|
g_free (context);
|
||||||
|
@ -120,7 +121,7 @@ do_cothread_context_destroy (cothread_context *context)
|
||||||
static void
|
static void
|
||||||
die (cothread *to_die) {
|
die (cothread *to_die) {
|
||||||
g_cond_free (to_die->cond);
|
g_cond_free (to_die->cond);
|
||||||
g_slist_remove (to_die->context->cothreads, to_die);
|
to_die->context->cothreads = g_slist_remove (to_die->context->cothreads, to_die);
|
||||||
g_free (to_die);
|
g_free (to_die);
|
||||||
g_thread_exit (to_die);
|
g_thread_exit (to_die);
|
||||||
/* don't unlock the mutex here, the thread waiting for us to die is gonna take it */
|
/* don't unlock the mutex here, the thread waiting for us to die is gonna take it */
|
||||||
|
@ -165,7 +166,7 @@ cothread_create (cothread_context *context, cothread_func func, int argc, char *
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
out2:
|
out2:
|
||||||
g_slist_remove (context->cothreads, ret);
|
context->cothreads = g_slist_remove (context->cothreads, ret);
|
||||||
g_free (ret);
|
g_free (ret);
|
||||||
out1:
|
out1:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue