From 6f44c0bd9b6c358af3c9a26c32594c9dc36ce345 Mon Sep 17 00:00:00 2001 From: caro Date: Fri, 4 Sep 2009 05:49:54 +0000 Subject: [PATCH] rename ecore_thread_init and ecore_thread_shutdown to fit usual private function names git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@42240 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore/ecore.c | 4 ++-- src/lib/ecore/ecore_private.h | 4 ++-- src/lib/ecore/ecore_thread.c | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 59dcafc..4278e26 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -89,7 +89,7 @@ ecore_init(void) if (_ecore_fps_debug) _ecore_fps_debug_init(); _ecore_signal_init(); _ecore_exe_init(); - ecore_thread_init(); + _ecore_thread_init(); _ecore_loop_time = ecore_time_get(); } @@ -115,7 +115,7 @@ ecore_shutdown(void) if (_ecore_fps_debug) _ecore_fps_debug_shutdown(); _ecore_poller_shutdown(); _ecore_animator_shutdown(); - ecore_thread_shutdown(); + _ecore_thread_shutdown(); _ecore_exe_shutdown(); _ecore_idle_enterer_shutdown(); _ecore_idle_exiter_shutdown(); diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 1badc67..5d250c6 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -444,8 +444,8 @@ void _ecore_fps_debug_init(void); void _ecore_fps_debug_shutdown(void); void _ecore_fps_debug_runtime_add(double t); -int ecore_thread_init(void); -int ecore_thread_shutdown(void); +int _ecore_thread_init(void); +int _ecore_thread_shutdown(void); extern int _ecore_fps_debug; extern double _ecore_loop_time; diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index 17b3905..9006cf2 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -27,7 +27,7 @@ struct _Ecore_Pthread_Worker static int _ecore_thread_count_max = 0; static int _ecore_thread_count = 0; -static int _ecore_thread_init = 0; +static int _ecore_thread_initcount = 0; static Eina_List *_ecore_thread = NULL; static int ECORE_THREAD_PIPE_DEL = 0; static Ecore_Event_Handler *del_handler = NULL; @@ -134,11 +134,11 @@ _ecore_thread_handler(void *data __UNUSED__, void *buffer, unsigned int nbyte) #endif int -ecore_thread_init(void) +_ecore_thread_init(void) { - _ecore_thread_init++; + _ecore_thread_initcount++; - if (_ecore_thread_init > 1) return _ecore_thread_init; + if (_ecore_thread_initcount > 1) return _ecore_thread_initcount; _ecore_thread_count_max = eina_cpu_count(); if (_ecore_thread_count_max <= 0) @@ -148,15 +148,15 @@ ecore_thread_init(void) #ifdef BUILD_PTHREAD del_handler = ecore_event_handler_add(ECORE_THREAD_PIPE_DEL, _ecore_thread_pipe_del, NULL); #endif - return _ecore_thread_init; + return _ecore_thread_initcount; } int -ecore_thread_shutdown(void) +_ecore_thread_shutdown(void) { - _ecore_thread_init--; + _ecore_thread_initcount--; - if (!_ecore_thread_init) + if (!_ecore_thread_initcount) { /* FIXME: If function are still running in the background, should we kill them ? */ #ifdef BUILD_PTHREAD @@ -165,7 +165,7 @@ ecore_thread_shutdown(void) #endif } - return _ecore_thread_init; + return _ecore_thread_initcount; } /* -- 2.7.4