ecore_main: check ecore_event generated by _ecore_main_prepare_handlers
authorYoungbok Shin <youngb.shin@samsung.com>
Thu, 26 Jul 2018 09:29:30 +0000 (18:29 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 26 Jul 2018 09:29:30 +0000 (18:29 +0900)
   For thread-safet related with wayland, below code was added.
   https://review.tizen.org/gerrit/#/c/64820/
   after this code, ecore_event related with wayland can be generated by prehandler.
   so before waiting the select function, we need to check one more time
   that ecore event was generated by prepare handler.

Change-Id: I1f3d5c4431bc277583b12a2754c35c79e308cc77
Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>
src/lib/ecore/ecore_main.c

index 35a1fdd..0ae1bcd 100644 (file)
@@ -1891,6 +1891,15 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
    // call the prepare callback for all handlers
    if (pd->fd_handlers_with_prep) _ecore_main_prepare_handlers(obj, pd);
 
+   //TIZEN_ONLY(20180717): check ecore event generated by prepare handler
+   if (pd->message_queue)
+     {
+        tv.tv_sec = 0;
+        tv.tv_usec = 0;
+        t = &tv;
+     }
+   //
+
 #ifdef HAVE_SYS_EPOLL_H
    if (pd->epoll_fd < 0)
      {