summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 12:18:24 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-06 12:18:24 +0000
commitf8dd49ded40e34d896e949c275753a95acc06978 (patch)
treea97c2c5d63622afb89ecd2c10b2c8442f572009e /src/lib/ecore
parentc6d1839a22a4035fa19461b960d2f64fe08cdbea (diff)
efl: ecore thread safety (remove option, keep code, add instructions).
* remove the option, as it shouldn't really exist. * keep code, as requested by Cedric, someone may fix it someday. And the default is the DISABLED, as the enable was broken. * Add instructions on how to solve the problem, if a brave folk is up to it. SVN revision: 80352
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/ecore_private.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index f0add822fe..a03dc9ed22 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -247,6 +247,25 @@ static inline void
247_ecore_lock(void) 247_ecore_lock(void)
248{ 248{
249#ifdef HAVE_THREAD_SAFETY 249#ifdef HAVE_THREAD_SAFETY
250 /* THIS IS BROKEN AND NEEDS FIXING
251 *
252 * the concept of lock to execute main-loop related functions is okay
253 * and the code below is correct per se, but with its usage in Ecore
254 * is leading to hard locks that must be investigated.
255 *
256 * One failure possibility is missing _ecore_unlock() that leaves
257 * the lock taken and on next take it will block.
258 *
259 * Another failure possibility is one function that takes the lock
260 * and calls some API function that also takes the lock, leading to
261 * block.
262 *
263 * When these are fixed, remove the HAVE_THREAD_SAFETY and leave it
264 * always on. To eliminate the lock overhead for non-threaded
265 * applications, have a global boolean that is set to TRUE by user
266 * if he uses this features, much like eina_log_threads_enable().
267 * -- Gustavo, December 6th 2012.
268 */
250 eina_lock_take(&_ecore_main_loop_lock); 269 eina_lock_take(&_ecore_main_loop_lock);
251#else 270#else
252 /* at least check we're not being called from a thread */ 271 /* at least check we're not being called from a thread */