diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-12 10:29:31 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-12 15:20:34 -0300 |
commit | c7007e983682b31d91e9ad7c3e85c49ffcc3651f (patch) | |
tree | b4ecc87ce9e43a34a2424159bd5e09e26fd2efb3 /tools/perf/util/util.h | |
parent | 4998a1224686d74ab7f7789787f7f7f904c75dfc (diff) | |
download | linux-rt-c7007e983682b31d91e9ad7c3e85c49ffcc3651f.tar.gz |
perf tools: Introduce weak alternative to sched_getcpu()
Which is just a wrapper for sys_getcpu and is not present in at least
musl libc.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-kblef7svmhr0g93kkx78envg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 2370cfb902b2..d8d41ef8da57 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -361,4 +361,8 @@ void print_binary(unsigned char *data, size_t len, size_t bytes_per_line, print_binary_t printer, void *extra); +#ifndef __GLIBC__ +extern int sched_getcpu(void); +#endif + #endif /* GIT_COMPAT_UTIL_H */ |