#include "eina_inlist.h"
#include "eina_inarray.h"
#include "eina_value.h"
+/* no model for now
#include "eina_model.h"
+ */
/*============================================================================*
* Local *
S(file);
S(prefix);
S(value);
+ S(tmpstr);
+ S(thread);
+/* no model for now
S(model);
+ */
#undef S
struct eina_desc_setup
S(file),
S(prefix),
S(value),
+ S(tmpstr),
+ S(thread)
+/* no model for now
S(model)
+ */
#undef S
};
static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) /
}
}
+ eina_cpu_count_internal();
+
_eina_main_count = 1;
return 1;
}
EAPI int
eina_shutdown(void)
{
+ if (_eina_main_count <= 0)
+ {
+ ERR("Init count not greater than 0 in shutdown.");
+ return 0;
+ }
_eina_main_count--;
if (EINA_UNLIKELY(_eina_main_count == 0))
{
eina_main_loop_is(void)
{
#ifdef EFL_HAVE_THREADS
- pid_t pid = getpid();
+ pid_t pid;
# ifdef _WIN32
+ if (_eina_main_loop == GetCurrentThreadId())
+ return EINA_TRUE;
+# else
+ if (pthread_equal(_eina_main_loop, pthread_self()))
+ return EINA_TRUE;
+# endif
+
+ pid = getpid();
+# ifdef _WIN32
if (pid != _eina_pid)
{
_eina_pid = pid;
_eina_main_loop = GetCurrentThreadId();
return EINA_TRUE;
}
- if (_eina_main_loop == GetCurrentThreadId())
- return EINA_TRUE;
-# else
+#else
if (pid != _eina_pid)
{
/* This is in case of a fork, but don't like the solution */
_eina_main_loop = pthread_self();
return EINA_TRUE;
}
-
- if (pthread_equal(_eina_main_loop, pthread_self()))
- return EINA_TRUE;
-# endif
#endif
+#endif
+
return EINA_FALSE;
}