free_display:
if (wl_egl_display->tdm.tdm_source) {
tpl_gmutex_lock(&wl_egl_display->tdm.tdm_mutex);
+ // Send destroy mesage to thread
+ tpl_gsource_destroy(wl_egl_display->tdm.tdm_source, TPL_TRUE);
while (!wl_egl_display->tdm.gsource_finalized) {
- tpl_gsource_destroy(wl_egl_display->tdm.tdm_source, TPL_TRUE);
tpl_gcond_wait(&wl_egl_display->tdm.tdm_cond, &wl_egl_display->tdm.tdm_mutex);
}
tpl_gmutex_unlock(&wl_egl_display->tdm.tdm_mutex);
if (wl_egl_display->disp_source) {
tpl_gmutex_lock(&wl_egl_display->disp_mutex);
+ // Send destroy mesage to thread
+ tpl_gsource_destroy(wl_egl_display->disp_source, TPL_TRUE);
while (!wl_egl_display->gsource_finalized) {
- tpl_gsource_destroy(wl_egl_display->disp_source, TPL_TRUE);
tpl_gcond_wait(&wl_egl_display->disp_cond, &wl_egl_display->disp_mutex);
}
tpl_gmutex_unlock(&wl_egl_display->disp_mutex);
* caller should use tpl_gcond_wait() in the loop with checking finalized flag
* */
tpl_gmutex_lock(&wl_egl_display->tdm.tdm_mutex);
+ // Send destroy mesage to thread
+ tpl_gsource_destroy(wl_egl_display->tdm.tdm_source, TPL_TRUE);
while (!wl_egl_display->tdm.gsource_finalized) {
- tpl_gsource_destroy(wl_egl_display->tdm.tdm_source, TPL_TRUE);
tpl_gcond_wait(&wl_egl_display->tdm.tdm_cond, &wl_egl_display->tdm.tdm_mutex);
}
wl_egl_display->tdm.tdm_source = NULL;
* caller should use tpl_gcond_wait() in the loop with checking finalized flag
* */
tpl_gmutex_lock(&wl_egl_display->disp_mutex);
+ // Send destroy mesage to thread
+ tpl_gsource_destroy(wl_egl_display->disp_source, TPL_TRUE);
while (wl_egl_display->disp_source && !wl_egl_display->gsource_finalized) {
- tpl_gsource_destroy(wl_egl_display->disp_source, TPL_TRUE);
tpl_gcond_wait(&wl_egl_display->disp_cond, &wl_egl_display->disp_mutex);
}
wl_egl_display->disp_source = NULL;
* caller should use tpl_gcond_wait() in the loop with checking finalized flag
* */
tpl_gmutex_lock(&wl_egl_surface->surf_mutex);
+ // Send destroy mesage to thread
+ tpl_gsource_destroy(wl_egl_surface->surf_source, TPL_TRUE);
while (wl_egl_surface->surf_source && !wl_egl_surface->gsource_finalized) {
- tpl_gsource_destroy(wl_egl_surface->surf_source, TPL_TRUE);
tpl_gcond_wait(&wl_egl_surface->surf_cond, &wl_egl_surface->surf_mutex);
}
wl_egl_surface->surf_source = NULL;