aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/lib/include/internal/lib.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-07-21 13:24:47 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-29 18:34:46 -0300
commitc03538b1f1a7e0e996a8d6feb20cf001d4b14939 (patch)
tree792c570d6799972d174c4f847d83373f6e0c39d1 /tools/perf/lib/include/internal/lib.h
parentlibperf: Move nr_members from perf's evsel to libperf's perf_evsel (diff)
downloadwireguard-linux-c03538b1f1a7e0e996a8d6feb20cf001d4b14939.tar.xz
wireguard-linux-c03538b1f1a7e0e996a8d6feb20cf001d4b14939.zip
libperf: Adopt the readn()/writen() functions from tools/perf
Move the readn()/writen() functions into libperf. Keep those non-namespaced names because they will be shared only between perf and libperf. Again, these are not exported functions. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-61-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib/include/internal/lib.h')
-rw-r--r--tools/perf/lib/include/internal/lib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/lib/include/internal/lib.h b/tools/perf/lib/include/internal/lib.h
new file mode 100644
index 000000000000..0b56f1201dc9
--- /dev/null
+++ b/tools/perf/lib/include/internal/lib.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LIBPERF_INTERNAL_LIB_H
+#define __LIBPERF_INTERNAL_LIB_H
+
+#include <unistd.h>
+
+ssize_t readn(int fd, void *buf, size_t n);
+ssize_t writen(int fd, const void *buf, size_t n);
+
+#endif /* __LIBPERF_INTERNAL_CPUMAP_H */