Skip to contentSkip to conversation

benchmarks/gem_syslatency: Add extra android guard to attr_setaffinity_np

PATCH In review Derek Morton 2 participants 2 messages Mar 10, 2016 – Mar 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 benchmarks/gem_syslatency: Add extra android guard to attr_setaffinity_np

Android defines __USE_GNU but does not provide pthread_attr_setaffinity_np() so added an extra guard arround pthread_attr_setaffinity_np().

---
 benchmarks/gem_syslatency.c | 2 ++
 1 file changed, 2 insertions(+)
benchmarks/gem_syslatency.c +2 -0
index f09050c..6cad3a0 100644
@@ -189,6 +189,7 @@ static void *sys_wait(void *arg)
 static void bind_cpu(pthread_attr_t *attr, int cpu)
 {
 #ifdef __USE_GNU
+#ifndef ANDROID
 	cpu_set_t mask;
 
 	if (cpu == -1)
@@ -199,6 +200,7 @@ static void bind_cpu(pthread_attr_t *attr, int cpu)
 
 	pthread_attr_setaffinity_np(attr, sizeof(mask), &mask);
 #endif
+#endif
 }
 
 static void rtprio(pthread_attr_t *attr, int prio)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 4 lines · Derek Morton

Android defines __USE_GNU but does not provide pthread_attr_setaffinity_np() so added an extra guard arround pthread_attr_setaffinity_np().

Pushed, thanks.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx