Ecore: Fix shadow declaration of variable 'time'.
SVN revision: 59720
This commit is contained in:
parent
943cd64c7f
commit
61ec1408bd
|
@ -785,10 +785,10 @@ _ecore_thread_shutdown(void)
|
|||
/* Improve emergency shutdown */
|
||||
EINA_LIST_FREE(_ecore_active_job_threads, pth)
|
||||
{
|
||||
Ecore_Pipe *p;
|
||||
Ecore_Pipe *ep;
|
||||
|
||||
PHA(pth->thread);
|
||||
PHJ(pth->thread, p);
|
||||
PHJ(pth->thread, ep);
|
||||
|
||||
ecore_pipe_del(pth->p);
|
||||
}
|
||||
|
@ -1741,33 +1741,34 @@ ecore_thread_global_data_del(const char *key)
|
|||
EAPI void *
|
||||
ecore_thread_global_data_wait(const char *key, double seconds)
|
||||
{
|
||||
double time = 0;
|
||||
double tm = 0;
|
||||
Ecore_Thread_Data *ret = NULL;
|
||||
|
||||
if (!key)
|
||||
return NULL;
|
||||
#ifdef EFL_HAVE_THREADS
|
||||
if (!_ecore_thread_global_hash)
|
||||
return NULL;
|
||||
if (seconds > 0)
|
||||
time = ecore_time_get() + seconds;
|
||||
tm = ecore_time_get() + seconds;
|
||||
|
||||
while (1)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
struct timespec t = { 0, 0 };
|
||||
|
||||
t.tv_sec = (long int)time;
|
||||
t.tv_nsec = (long int)((time - (double)t.tv_sec) * 1000000000);
|
||||
t.tv_sec = (long int)tm;
|
||||
t.tv_nsec = (long int)((tm - (double)t.tv_sec) * 1000000000);
|
||||
#else
|
||||
struct timeval t = { 0, 0 };
|
||||
|
||||
t.tv_sec = (long int)time;
|
||||
t.tv_usec = (long int)((time - (double)t.tv_sec) * 1000000);
|
||||
t.tv_sec = (long int)tm;
|
||||
t.tv_usec = (long int)((tm - (double)t.tv_sec) * 1000000);
|
||||
#endif
|
||||
LRWKRL(_ecore_thread_global_hash_lock);
|
||||
ret = eina_hash_find(_ecore_thread_global_hash, key);
|
||||
LRWKU(_ecore_thread_global_hash_lock);
|
||||
if ((ret) || (!seconds) || ((seconds > 0) && (time <= ecore_time_get())))
|
||||
if ((ret) || (!seconds) || ((seconds > 0) && (tm <= ecore_time_get())))
|
||||
break;
|
||||
LKL(_ecore_thread_global_hash_mutex);
|
||||
CDW(_ecore_thread_global_hash_cond, _ecore_thread_global_hash_mutex, &t);
|
||||
|
|
Loading…
Reference in New Issue