tpl_wayland_egl_thread: Fixed a deadlock issue in case of destroying display source. 59/134759/4
authorjoonbum.ko <joonbum.ko@samsung.com>
Wed, 19 Apr 2017 08:56:18 +0000 (17:56 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Wed, 21 Jun 2017 07:04:24 +0000 (16:04 +0900)
Change-Id: Id622900535bc981952ef60b01328bd8e72bcdbd0
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl_thread.c

index c893f94..ad3c53f 100644 (file)
@@ -135,7 +135,7 @@ _twe_thread_wl_disp_finalize(GSource *source)
 {
        twe_wl_disp_source *wl_source = (twe_wl_disp_source *)source;
 
-       wl_display_dispatch_queue(wl_source->disp, wl_source->ev_queue);
+       wl_display_dispatch_queue_pending(wl_source->disp, wl_source->ev_queue);
        wl_event_queue_destroy(wl_source->ev_queue);
 
        return;
@@ -177,7 +177,7 @@ twe_thread_del_wl_display(twe_thread* thread, struct wl_display *display)
        source = (twe_wl_disp_source *)g_main_context_find_source_by_user_data(
                        g_main_loop_get_context(thread->ctx->twe_loop), display);
        if (!source) {
-               TPL_ERROR("Failed to get source from context.");
+               TPL_ERR("Failed to get source from context.");
                return;
        }
 
@@ -199,8 +199,8 @@ _twe_thread_wl_surface_dispatch(GSource *source, GSourceFunc cb, gpointer date)
 
                s = read(wl_surf_source->event_fd, &u, sizeof(uint64_t));
                if (s != sizeof(uint64_t))
-                       TPL_ERROR("Failed to  read from event_fd(%d)\n",
-                                         wl_surf_source->event_fd);
+                       TPL_ERR("Failed to  read from event_fd(%d)\n",
+                                       wl_surf_source->event_fd);
        }
 
        return G_SOURCE_CONTINUE;
@@ -238,14 +238,14 @@ twe_thread_add_wl_surface(twe_thread* thread,
        source = (twe_wl_surf_source *)g_source_new(&_twe_wl_surface_funcs,
                                                                                                sizeof(twe_wl_surf_source));
        if (!source) {
-               TPL_ERROR("[THREAD] Failed to create GSource from event_channel(%p)",
-                                 event_channel);
+               TPL_ERR("[THREAD] Failed to create GSource from event_channel(%p)",
+                               event_channel);
                return -1;
        }
 
        source->event_fd = eventfd(0, EFD_CLOEXEC);
        if (source->event_fd < 0) {
-               TPL_ERROR("[THREAD] Failed to create eventfd. errno(%d)", errno);
+               TPL_ERR("[THREAD] Failed to create eventfd. errno(%d)", errno);
                g_source_unref(&source->gsource);
                return -1;
        }
@@ -272,7 +272,7 @@ twe_thread_del_wl_surface(twe_thread* thread, struct wl_surface *surface)
        source = (twe_wl_surf_source *) g_main_context_find_source_by_user_data(
                                        g_main_loop_get_context(ctx->twe_loop), surface);
        if (!source) {
-               TPL_ERROR("[THREAD] Failed to get source from context.");
+               TPL_ERR("[THREAD] Failed to get source from context.");
                return;
        }