From e52700791055ea5e3bfce4111f62da5e4a7da9ba Mon Sep 17 00:00:00 2001 From: Hubert Stachowiak Date: Tue, 25 Apr 2023 12:14:04 +0200 Subject: [PATCH] eina: Add check for pthread_attr_setaffinity_np Change-Id: I126557c34efa4ec1bd25a4a53b39f1aba038f9e7 --- src/lib/eina/eina_thread.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c index 9dde953..ca8a0b4 100644 --- a/src/lib/eina/eina_thread.c +++ b/src/lib/eina/eina_thread.c @@ -77,7 +77,12 @@ _eina_thread_create(Eina_Thread *t, int affinity, void *(*func)(void *data), voi CPU_ZERO(&cpu); CPU_SET(affinity, &cpu); - pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); + // TIZEN_ONLY(20230425) eina: Add check for pthread_attr_setaffinity_np + if (pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu) != 0) + { + return EINA_FALSE; + } + // #endif } -- 2.7.4