From c42120c4fddc408aad15d30f48c4ee6c71261480 Mon Sep 17 00:00:00 2001 From: Ji-Youn Park Date: Tue, 16 Aug 2016 18:04:15 +0830 Subject: [PATCH] ecore: Add multi thread error message. 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 | 3 +++ src/lib/ecore/ecore_idle_enterer.c | 3 +++ src/lib/ecore/ecore_idle_exiter.c | 3 +++ src/lib/ecore/ecore_idler.c | 3 +++ src/lib/ecore/ecore_job.c | 3 +++ src/lib/ecore/ecore_poller.c | 3 +++ src/lib/ecore/ecore_timer.c | 3 +++ 7 files changed, 21 insertions(+) diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index 2330090..30cfcc6 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -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); } diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c index c4091ee..f8afa7e 100644 --- a/src/lib/ecore/ecore_idle_enterer.c +++ b/src/lib/ecore/ecore_idle_enterer.c @@ -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); } diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c index f990404..4ae2df4 100644 --- a/src/lib/ecore/ecore_idle_exiter.c +++ b/src/lib/ecore/ecore_idle_exiter.c @@ -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; } diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c index 7c4a73c..ba39201 100644 --- a/src/lib/ecore/ecore_idler.c +++ b/src/lib/ecore/ecore_idler.c @@ -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; } diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c index ed988ab..5bf2bdf 100644 --- a/src/lib/ecore/ecore_job.c +++ b/src/lib/ecore/ecore_job.c @@ -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); diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c index 348a734..593e54a 100644 --- a/src/lib/ecore/ecore_poller.c +++ b/src/lib/ecore/ecore_poller.c @@ -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; } diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index 9b82856..d845300 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -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); } -- 2.7.4