From e0c1f4a2a7866109c651c956b182d5fe7b33b5d4 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 24 Aug 2016 14:20:17 -0500 Subject: [PATCH] evas: Try harder to create the render thread It's entirely possible that a system doesn't have a cpu 0, so when we try to pin all our render threads onto processor 0 we may fail. This results in some very connfusing build breakage when edje_cc hangs up because its render thread didn't start. So, if starting the thread with affinity fails, let's try without affinity. (This is trivial to reproduce - just use sysfs to turn off cpu0 after boot.) @fix --- src/lib/evas/common/evas_thread_render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c index 21214ac781..623e40e4f4 100644 --- a/src/lib/evas/common/evas_thread_render.c +++ b/src/lib/evas/common/evas_thread_render.c @@ -137,7 +137,9 @@ evas_thread_init(void) CRI("Could not create draw thread condition"); if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0, evas_thread_worker_func, NULL)) - CRI("Could not create draw thread"); + if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, -1, + evas_thread_worker_func, NULL)) + CRI("Could not create draw thread"); } void