evas: don't forget to init eina_threads when using threads.

SVN revision: 58908
This commit is contained in:
Cedric BAIL 2011-04-25 17:11:58 +00:00
parent b558cbc07e
commit a613126be4
1 changed files with 8 additions and 5 deletions

View File

@ -165,7 +165,9 @@ evas_common_frameq_destroy(void)
LKU(gframeq.mutex);
#endif
LKD(gframeq.mutex);
eina_threads_shutdown();
gframeq.frames = NULL;
gframeq.initialised = 0;
}
@ -869,6 +871,8 @@ evas_common_frameq_begin(void)
gframeq.thread_num = cpunum;
gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD;
eina_threads_init();
for (i = 0; i < gframeq.thread_num; i++)
{
@ -1637,6 +1641,8 @@ evas_common_pipe_init(void)
// waiting onm pthread barriers for async rendering on a single core!
// if (thread_num == 1) return EINA_FALSE;
eina_threads_init();
pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1);
for (i = 0; i < thread_num; i++)
@ -1676,11 +1682,8 @@ evas_common_pipe_init(void)
evas_common_pipe_load, &(task_thinfo[i]));
pthread_attr_destroy(&attr);
}
#if defined(METRIC_CACHE) || defined(WORD_CACHE)
eina_threads_init();
#endif
}
if (thread_num == 1) return EINA_FALSE;
return EINA_TRUE;
#endif