ecore: Add multi thread error message. 50/84050/2
authorJi-Youn Park <jy0703.park@samsung.com>
Tue, 16 Aug 2016 09:34:15 +0000 (18:04 +0830)
committerJi-Youn Park <jy0703.park@samsung.com>
Tue, 16 Aug 2016 09:39:37 +0000 (18:09 +0830)
    tizen 2.3 returns ecore_timer or idler even though ecore_timer_add or ecore_job_add called outside of mainloop.
    so we add error message to give chance for application to remove wrnog code (call ecore function outside mainloop)
    but this can hide the problem and make it hard to know what is real problem.
    so if application see the error message, they should their code.

Change-Id: Ib42dfeb5dc30255e40fee5e791523e1108764f2a

src/lib/ecore/ecore_anim.c
src/lib/ecore/ecore_idle_enterer.c
src/lib/ecore/ecore_idle_exiter.c
src/lib/ecore/ecore_idler.c
src/lib/ecore/ecore_job.c
src/lib/ecore/ecore_poller.c
src/lib/ecore/ecore_timer.c

index 2330090..30cfcc6 100644 (file)
@@ -346,6 +346,9 @@ _ecore_animator_add(Ecore_Animator *obj,
 {
     if (EINA_UNLIKELY(!eina_main_loop_is()))
       {
+// TIZEN_ONLY(20150810): Add multi thread error message
+         ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
          EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
       }
 
index c4091ee..f8afa7e 100644 (file)
@@ -39,6 +39,9 @@ _ecore_idle_enterer_add(Ecore_Idle_Enterer *obj,
 {
     if (EINA_UNLIKELY(!eina_main_loop_is()))
       {
+// TIZEN_ONLY(20150810): Add multi thread error message
+         ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
          EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
       }
 
index f990404..4ae2df4 100644 (file)
@@ -47,6 +47,9 @@ _ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_C
    _ecore_lock();
     if (EINA_UNLIKELY(!eina_main_loop_is()))
       {
+// TIZEN_ONLY(20150810): Add multi thread error message
+         ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
          EINA_MAIN_LOOP_CHECK_RETURN;
       }
 
index 7c4a73c..ba39201 100644 (file)
@@ -50,6 +50,9 @@ _ecore_idler_constructor(Eo *obj, Ecore_Idler_Data *ie, Ecore_Task_Cb func, cons
 {
     if (EINA_UNLIKELY(!eina_main_loop_is()))
       {
+// TIZEN_ONLY(20150810): Add multi thread error message
+         ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
          EINA_MAIN_LOOP_CHECK_RETURN;
       }
 
index ed988ab..5bf2bdf 100644 (file)
@@ -58,6 +58,9 @@ _ecore_job_constructor(Eo *obj, Ecore_Job_Data *job, Ecore_Cb func, const void *
 {
    if (EINA_UNLIKELY(!eina_main_loop_is()))
      {
+// TIZEN_ONLY(20150810): Add multi thread error message
+        ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
         EINA_MAIN_LOOP_CHECK_RETURN;
      }
    eo_manual_free_set(obj, EINA_TRUE);
index 348a734..593e54a 100644 (file)
@@ -251,6 +251,9 @@ _ecore_poller_constructor(Eo *obj, Ecore_Poller_Data *poller, Ecore_Poller_Type
 
     if (EINA_UNLIKELY(!eina_main_loop_is()))
       {
+// TIZEN_ONLY(20150810): Add multi thread error message
+         ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
          EINA_MAIN_LOOP_CHECK_RETURN;
       }
 
index 9b82856..d845300 100644 (file)
@@ -112,6 +112,9 @@ _ecore_timer_add(Ecore_Timer *obj,
 
    if (EINA_UNLIKELY(!eina_main_loop_is()))
      {
+// TIZEN_ONLY(20150810): Add multi thread error message
+        ERR("You are calling %s from outside of the main loop threads. Program cannot run nomally", __FUNCTION__);
+//
         EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
      }