#include "evas_common_private.h"
+#include "eina_cpu_private.h"
#include <assert.h>
void
evas_thread_init(void)
{
+ int core;
if (init_count++) return;
eina_threads_init();
CRI("Could not create draw thread lock");
if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock))
CRI("Could not create draw thread condition");
- if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0,
+
+ core = _eina_cpu_fast_core_get();
+ /* Keep previous behaviour of pinning to core 0 if finding a fast
+ * core fails.
+ */
+ if (core < 0) core = 0;
+ if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, core,
evas_thread_worker_func, NULL))
if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, -1,
evas_thread_worker_func, NULL))