summaryrefslogtreecommitdiff
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-11-28 11:30:16 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-02 09:22:46 -0300
commitbc3a502bc2bc78d03526d6abcc5697aab18d5ae9 (patch)
tree9811125522636d12b6c2bb67d8ef4e8c69f6511c /tools/perf/util/util.h
parent838d14520267769648fb2fc2a637107a1d102590 (diff)
perf tools: Add writen function
Adding 'writen' function as a synchronous wrapper for write syscall with following prototype: ssize_t writen(int fd, void *buf, size_t n) Returns the number of bytes written on success or -1 in case of err. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Requested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-5-git-send-email-jolsa@redhat.com 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 9f6b928f6b2b..ce0f73d4d91f 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -254,6 +254,7 @@ int strtailcmp(const char *s1, const char *s2);
char *strxfrchar(char *s, char from, char to);
unsigned long convert_unit(unsigned long value, char *unit);
ssize_t readn(int fd, void *buf, size_t n);
+ssize_t writen(int fd, void *buf, size_t n);
struct perf_event_attr;