twe_del_source *del_source = (twe_del_source *)source;
GIOCondition cond;
+ g_mutex_lock(&_twe_ctx->thread_mutex);
+
if (g_source_is_destroyed(source)) {
TPL_ERR("del_source(%p) already destroyed.", source);
+ g_cond_signal(&_twe_ctx->thread_cond);
+ g_mutex_unlock(&_twe_ctx->thread_mutex);
return G_SOURCE_REMOVE;
}
} else {
TPL_ERR("eventfd(%d) cannot wake up with other condition. cond(%d)",
del_source->event_fd, cond);
+ g_cond_signal(&_twe_ctx->thread_cond);
+ g_mutex_unlock(&_twe_ctx->thread_mutex);
TPL_ASSERT((cond & G_IO_IN));
}
+ g_cond_signal(&_twe_ctx->thread_cond);
+ g_mutex_unlock(&_twe_ctx->thread_mutex);
+
return G_SOURCE_CONTINUE;
}
{
twe_tdm_source *tdm_source = (twe_tdm_source *)source;
- g_mutex_lock(&_twe_ctx->thread_mutex);
-
if (!tdm_source || g_source_is_destroyed(&tdm_source->gsource)) {
TPL_ERR("TDM source(%p) already destroyed.", tdm_source);
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
return;
}
g_source_remove_unix_fd(&tdm_source->gsource, tdm_source->tag);
g_source_destroy(&tdm_source->gsource);
g_source_unref(&tdm_source->gsource);
-
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
}
twe_thread*
return;
}
- g_mutex_lock(&_twe_ctx->thread_mutex);
g_mutex_lock(&disp_source->wl_event_mutex);
/* If disp_source is in prepared state, cancel it */
g_source_remove_poll(&disp_source->gsource, &disp_source->gfd);
g_source_destroy(&disp_source->gsource);
g_source_unref(&disp_source->gsource);
-
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
}
twe_display_h
return;
}
- g_mutex_lock(&_twe_ctx->thread_mutex);
-
g_mutex_lock(&disp_source->wl_event_mutex);
g_mutex_lock(&surf_source->surf_mutex);
g_source_remove_unix_fd(&surf_source->gsource, surf_source->tag);
g_source_destroy(&surf_source->gsource);
g_source_unref(&surf_source->gsource);
-
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
}
static gpointer