diff options
| author | Mark Brown <broonie@kernel.org> | 2017-11-28 16:19:52 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2017-11-28 16:19:52 +0000 |
| commit | 69830d3909849dee33b9a2de88ece3d59c75a1b8 (patch) | |
| tree | 67e22ac989e782ddc104f186dee54d1675e76923 /tools/perf/util/util.c | |
| parent | af1b1cefd735c919d3185ce06b549c2b121067ba (diff) | |
| parent | ef2e8175eb19011f756469d4d14f4207bf7f289c (diff) | |
Merge branch 'topic/disconnect' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
Diffstat (limited to 'tools/perf/util/util.c')
| -rw-r--r-- | tools/perf/util/util.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 3687b720327a..a789f952b3e9 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -7,6 +7,7 @@ #include <sys/stat.h> #include <sys/utsname.h> #include <dirent.h> +#include <fcntl.h> #include <inttypes.h> #include <signal.h> #include <stdio.h> @@ -23,6 +24,19 @@ /* * XXX We need to find a better place for these things... */ + +bool perf_singlethreaded = true; + +void perf_set_singlethreaded(void) +{ + perf_singlethreaded = true; +} + +void perf_set_multithreaded(void) +{ + perf_singlethreaded = false; +} + unsigned int page_size; int cacheline_size; @@ -175,7 +189,7 @@ out: return err; } -int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size) +static int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size) { void *ptr; loff_t pgoff; |
