From: Cedric BAIL Date: Wed, 14 Oct 2015 17:57:53 +0000 (-0700) Subject: ecore: fix usage eina_condition_timedwait to use relative time instead of absolute... X-Git-Tag: v1.16.0-beta2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4117cdae4ad0f03d3b4d4683ad93511423f65eb;p=platform%2Fupstream%2Fefl.git ecore: fix usage eina_condition_timedwait to use relative time instead of absolute time. This could lead to some very long and unexpected pause as the timeout passed to eina_condition_timedwait was passed as a absolute time instead of relative. Hopefully we don't build rocket. --- diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index f1aa613..befb0fb 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -1398,7 +1398,7 @@ ecore_thread_global_data_wait(const char *key, if ((ret) || (!seconds) || ((seconds > 0) && (tm <= ecore_time_get()))) break; LKL(_ecore_thread_global_hash_mutex); - CDW(_ecore_thread_global_hash_cond, tm); + CDW(_ecore_thread_global_hash_cond, tm - ecore_time_get()); LKU(_ecore_thread_global_hash_mutex); } if (ret) return ret->data;