summaryrefslogtreecommitdiff
path: root/tools/perf/bench/futex.h
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2018-11-10 00:07:19 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-11-21 18:00:32 +0300
commitd47d77c3f008d3cf02c6ce92ef4f6e32ca270351 (patch)
tree0d83f954a91f0bf3b41e3c29bb84de7013e9703c /tools/perf/bench/futex.h
parent9add8fe8e6f63db47e40e65173530dcb68cd7a07 (diff)
downloadlinux-d47d77c3f008d3cf02c6ce92ef4f6e32ca270351.tar.xz
perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h
Both futex and epoll need this call, and can cause build failure on systems that don't have it pthread_attr_setaffinity_np(). Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Davidlohr Bueso <dbueso@suse.de> Cc: Jason Baron <jbaron@akamai.com> Link: http://lkml.kernel.org/r/20181109210719.pr7ohayuwqmfp2wl@linux-r8p5 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench/futex.h')
-rw-r--r--tools/perf/bench/futex.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h
index db4853f209c7..31b53cc7d5bc 100644
--- a/tools/perf/bench/futex.h
+++ b/tools/perf/bench/futex.h
@@ -86,16 +86,4 @@ futex_cmp_requeue(u_int32_t *uaddr, u_int32_t val, u_int32_t *uaddr2, int nr_wak
return futex(uaddr, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, uaddr2,
val, opflags);
}
-
-#ifndef HAVE_PTHREAD_ATTR_SETAFFINITY_NP
-#include <pthread.h>
-#include <linux/compiler.h>
-static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr __maybe_unused,
- size_t cpusetsize __maybe_unused,
- cpu_set_t *cpuset __maybe_unused)
-{
- return 0;
-}
-#endif
-
#endif /* _FUTEX_H */