#include #include #include #include #include "ioexact.h" extern volatile sig_atomic_t sigint; ssize_t read_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = read(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } ssize_t write_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = write(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } i/linux/net-next.git/'>net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-08-04 11:02:38 +0200
committerIngo Molnar <mingo@kernel.org>2016-08-04 11:02:38 +0200
commitf282f7a0ecc3e0b8fd8532a6c3e9401534cb907c (patch)
tree93dacb43169c8339d47282d06b4eb4a8b42bcd18
parent0d87d7ec22a0879d3926faa4f4f4412a5dee1fba (diff)
parentc369e0a1a8fa6ca80e6c37c8735d9427b623ae62 (diff)
Merge tag 'perf-core-for-mingo-20160803' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Add --sample-cpu to 'perf record', to explicitely ask for sampling the CPU (Jiri Olsa) Fixes: - Fix processing of multi byte chunks in objdump output, fixing disassemble processing for annotation on at least ARM64 (Jan Stancek) - Use SyS_epoll_wait in a BPF 'perf test' entry instead of sys_epoll_wait, that is not present in the DWARF info in vmlinux files (Arnaldo Carvalho de Melo) - Add -wno-shadow when processing files using perl headers, fixing the build on Fedora Rawhide and Arch Linux (Namhyung Kim) Infrastructure changes: - Annotate prep work to better catch and report errors related to using objdump to disassemble DSOs (Arnaldo Carvalho de Melo) - Add 'alloc', 'scnprintf' and 'and' methods for bitmap processing (Jiri Olsa) - Add nested output resorting callback in hists processing (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>