void _ecore_fps_debug_shutdown(void);
void _ecore_fps_debug_runtime_add(double t);
-int _ecore_thread_init(void);
-int _ecore_thread_shutdown(void);
+void _ecore_thread_init(void);
+void _ecore_thread_shutdown(void);
void _ecore_glib_init(void);
void _ecore_glib_shutdown(void);
static int _ecore_thread_count_max = 0;
static int _ecore_thread_count = 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;
}
#endif
-int
+void
_ecore_thread_init(void)
{
- _ecore_thread_initcount++;
-
- if (_ecore_thread_initcount > 1) return _ecore_thread_initcount;
-
_ecore_thread_count_max = eina_cpu_count();
if (_ecore_thread_count_max <= 0)
_ecore_thread_count_max = 1;
#ifdef BUILD_PTHREAD
del_handler = ecore_event_handler_add(ECORE_THREAD_PIPE_DEL, _ecore_thread_pipe_del, NULL);
#endif
- return _ecore_thread_initcount;
}
-int
+void
_ecore_thread_shutdown(void)
{
- _ecore_thread_initcount--;
-
- if (!_ecore_thread_initcount)
- {
- /* FIXME: If function are still running in the background, should we kill them ? */
+ /* FIXME: If function are still running in the background, should we kill them ? */
#ifdef BUILD_PTHREAD
- ecore_event_handler_del(del_handler);
- del_handler = NULL;
+ ecore_event_handler_del(del_handler);
+ del_handler = NULL;
#endif
- }
-
- return _ecore_thread_initcount;
}
/*