diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-12 09:29:31 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-12 14:20:34 -0400 |
commit | c7007e983682b31d91e9ad7c3e85c49ffcc3651f (patch) | |
tree | b4ecc87ce9e43a34a2424159bd5e09e26fd2efb3 /tools/perf/util/util.h | |
parent | 4998a1224686d74ab7f7789787f7f7f904c75dfc (diff) |
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, | |||
361 | size_t bytes_per_line, print_binary_t printer, | 361 | size_t bytes_per_line, print_binary_t printer, |
362 | void *extra); | 362 | void *extra); |
363 | 363 | ||
364 | #ifndef __GLIBC__ | ||
365 | extern int sched_getcpu(void); | ||
366 | #endif | ||
367 | |||
364 | #endif /* GIT_COMPAT_UTIL_H */ | 368 | #endif /* GIT_COMPAT_UTIL_H */ |