diff options
author | Derek Morton <derek.j.morton@intel.com> | 2016-03-10 14:27:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-11 11:34:48 +0000 |
commit | d264c73929e95f5dfb26235b8e6e9af7dca4b701 (patch) | |
tree | cde4ce3a4bf0650474084681f3c88aa91040eb98 /benchmarks | |
parent | 5615ab2a9dceaf101e1faa0fa132ef1dadbabc04 (diff) |
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().
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/gem_syslatency.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c index f09050c7..6cad3a05 100644 --- a/benchmarks/gem_syslatency.c +++ b/benchmarks/gem_syslatency.c @@ -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) |