From b3e75e1c5774126e24289b55a410430a397c3c98 Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 25 Apr 2011 17:11:58 +0000 Subject: [PATCH] evas: don't forget to init eina_threads when using threads. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@58908 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/engines/common/evas_pipe.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/engines/common/evas_pipe.c b/src/lib/engines/common/evas_pipe.c index 1f1b030..b18ab0d 100644 --- a/src/lib/engines/common/evas_pipe.c +++ b/src/lib/engines/common/evas_pipe.c @@ -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 -- 2.7.4