From a6ef69f513b9e670e3f8966e23009e3f297cafff Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 18 May 2018 15:51:43 +0900 Subject: [PATCH] eo: Turn thread-validation off for unstable Tizen 5.0 apps which are violating thread-safety. Eo has gotten more strict-check for thread violiation API calls. Since Tizen 5.0, many apps(which violates EAPI thread safety rules) unexpectedly became unstable cause of thread-validation. We disable this function for now but wish to remove this temporary code in the near future when apps are ready to go. Change-Id: Ibbd99d3b26609fca23fd4c5bd029e67f63e3a830 --- packaging/efl.spec | 3 +++ src/lib/eo/eo_ptr_indirection.c | 5 +++++ src/lib/eo/eo_ptr_indirection.x | 17 +++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/packaging/efl.spec b/packaging/efl.spec index f36be11..ff7a9f4 100755 --- a/packaging/efl.spec +++ b/packaging/efl.spec @@ -1183,6 +1183,9 @@ CFLAGS+=" -DMESA_EGL_NO_X11_HEADERS " CFLAGS+=" -DLIBDIR=\\\"%{_libdir}\\\"" +# disable eo thread check? +#CFLAGS+=" -DDISABLE_EO_THREAD_CHECK" + %if "%{asan}" == "1" %restore_fcommon %endif diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c index 01db8a2..95dd493 100644 --- a/src/lib/eo/eo_ptr_indirection.c +++ b/src/lib/eo/eo_ptr_indirection.c @@ -12,6 +12,11 @@ Eina_TLS _eo_table_data; Eo_Id_Data *_eo_table_data_shared = NULL; Eo_Id_Table_Data *_eo_table_data_shared_data = NULL; +/* TIZEN_ONLY(20180518): See _eo_table_data_get() in eo_ptr_indirection.x. */ +#ifdef DISABLE_EO_THREAD_CHECK +Eo_Id_Data *_tizen_eo_table_data = NULL; +#endif + ////////////////////////////////////////////////////////////////////////// void diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index d6affe0..971e8e1 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -320,6 +320,11 @@ extern Eina_TLS _eo_table_data; extern Eo_Id_Data *_eo_table_data_shared; extern Eo_Id_Table_Data *_eo_table_data_shared_data; +/* TIZEN_ONLY(20180518): See _eo_table_data_get() */ +#ifdef DISABLE_EO_THREAD_CHECK +extern Eo_Id_Data *_tizen_eo_table_data; +#endif + static inline Eo_Id_Table_Data * _eo_table_data_table_new(Efl_Id_Domain domain) { @@ -366,6 +371,17 @@ _eo_table_data_table_free(Eo_Id_Table_Data *tdata) static inline Eo_Id_Data * _eo_table_data_get(void) { + /* TIZEN_ONLY(20180518): Turn thread-validation off for unstable Tizen 5.0 + apps which are violating thread-safety. Eo has gotten more strict-check + for thread violiation API calls. Since Tizen 5.0, many apps(which + violates EAPI thread safety rules) unexpectedly became unstable cause of + thread-validation. We disable this function for now but wish to remove + this temporary code in the near future when apps are ready to go. */ +#ifdef DISABLE_EO_THREAD_CHECK + if (_tizen_eo_table_data) return _tizen_eo_table_data; + _tizen_eo_table_data = _eo_table_data_new(EFL_ID_DOMAIN_MAIN); + return _tizen_eo_table_data; +#else Eo_Id_Data *data = eina_tls_get(_eo_table_data); if (EINA_LIKELY(data != NULL)) return data; @@ -374,6 +390,7 @@ _eo_table_data_get(void) eina_tls_set(_eo_table_data, data); return data; +#endif } static inline Eo_Id_Table_Data * -- 2.7.4