mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
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>
This commit is contained in:
parent
5615ab2a9d
commit
d264c73929
@ -189,6 +189,7 @@ static void *sys_wait(void *arg)
|
|||||||
static void bind_cpu(pthread_attr_t *attr, int cpu)
|
static void bind_cpu(pthread_attr_t *attr, int cpu)
|
||||||
{
|
{
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_GNU
|
||||||
|
#ifndef ANDROID
|
||||||
cpu_set_t mask;
|
cpu_set_t mask;
|
||||||
|
|
||||||
if (cpu == -1)
|
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);
|
pthread_attr_setaffinity_np(attr, sizeof(mask), &mask);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtprio(pthread_attr_t *attr, int prio)
|
static void rtprio(pthread_attr_t *attr, int prio)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user