aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
index 2b81b72eca23..fdada5e8d454 100644
--- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
+++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
@@ -1,5 +1,6 @@
1#include <stdint.h> 1#include <stdint.h>
2#include <pthread.h> 2#include <pthread.h>
3#include <sched.h>
3 4
4int main(void) 5int main(void)
5{ 6{
@@ -8,7 +9,8 @@ int main(void)
8 cpu_set_t cs; 9 cpu_set_t cs;
9 10
10 pthread_attr_init(&thread_attr); 11 pthread_attr_init(&thread_attr);
11 /* don't care abt exact args, just the API itself in libpthread */ 12 CPU_ZERO(&cs);
13
12 ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); 14 ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs);
13 15
14 return ret; 16 return ret;