From: caro Date: Fri, 22 Oct 2010 17:39:25 +0000 (+0000) Subject: [ecore] fix compilation when pthread is not available X-Git-Tag: build/2012-07-04.173327~1570 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28eec5d7d847ad42b0b9e3dd8fc84b1d4aff4a38;p=profile%2Fivi%2Fecore.git [ecore] fix compilation when pthread is not available git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@53777 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index 34b9a60..09af8c8 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -471,9 +471,10 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking, Ecore_Cb func_cancel, const void *data) { -#ifdef EFL_HAVE_PTHREAD Ecore_Pthread_Worker *work; +#ifdef EFL_HAVE_PTHREAD Ecore_Pthread_Data *pth = NULL; +#endif if (!func_blocking) return NULL; @@ -485,9 +486,6 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking, } work->u.short_run.func_blocking = func_blocking; - work->hash = NULL; - pthread_cond_init(&work->cond, NULL); - pthread_mutex_init(&work->mutex, NULL); work->func_end = func_end; work->func_cancel = func_cancel; work->cancel = EINA_FALSE; @@ -495,6 +493,11 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking, work->kill = EINA_FALSE; work->data = data; +#ifdef EFL_HAVE_PTHREAD + work->hash = NULL; + pthread_cond_init(&work->cond, NULL); + pthread_mutex_init(&work->mutex, NULL); + pthread_mutex_lock(&_ecore_pending_job_threads_mutex); _ecore_pending_job_threads = eina_list_append(_ecore_pending_job_threads, work);