git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@70328
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
* Add missing API eina_file_map_faulted() on Windows. Does nothing
for now.
+
+2012-04-19 Cedric Bail
+
+ * Make it possible to force the number of detected CPU on a system.
* forgotten initialization of eina list count during eina_list_split_list.
* leak in Eina_File.
* deadlock in Eina_File.
+ * make it possible to force the number of detected CPU on a system.
Improvements:
return ecf;
}
-EAPI int eina_cpu_count(void)
+static int _cpu_count = -1;
+
+static int
+_eina_cpu_count_internal(void)
{
#ifdef EFL_HAVE_THREADS
return 1;
#endif
}
+
+EAPI int eina_cpu_count(void)
+{
+ return _cpu_count;
+}
+
+void eina_cpu_count_internal(void)
+{
+ if (getenv("EINA_CPU_FAKE"))
+ _cpu_count = atoi(getenv("EINA_CPU_FAKE"));
+ else
+ _cpu_count = _eina_cpu_count_internal();
+}
}
}
+ eina_cpu_count_internal();
+
_eina_main_count = 1;
return 1;
}
void eina_log_threads_shutdown(void);
#endif
+void eina_cpu_count_internal(void);
+
void eina_file_mmap_faulty(void *addr, long page_size);
#endif /* EINA_PRIVATE_H_ */