aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fd/array.h
diff options
context:
space:
mode:
authorAlexey Bayduraev <[email protected]>2022-01-17 18:34:22 +0000
committerArnaldo Carvalho de Melo <[email protected]>2022-02-10 19:25:20 +0000
commitd87c25e8f4051f813762da6a182c57f246b17441 (patch)
tree80240697c0123df5be265716b9e9ad72ad2c2822 /tools/lib/api/fd/array.h
parentperf record: Introduce thread affinity and mmap masks (diff)
downloadkernel-d87c25e8f4051f813762da6a182c57f246b17441.tar.gz
kernel-d87c25e8f4051f813762da6a182c57f246b17441.zip
tools lib: Introduce fdarray duplicate function
Introduce a function to duplicate an existing file descriptor in the fdarray structure. The function returns the position of the duplicated file descriptor. Reviewed-by: Riccardo Mancini <[email protected]> Signed-off-by: Alexey Bayduraev <[email protected]> Tested-by: Jiri Olsa <[email protected]> Tested-by: Riccardo Mancini <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Antonov <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Alexei Budankov <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/2891f1def287d5863cc82683a4d5879195c8d90c.1642440724.git.alexey.v.bayduraev@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/api/fd/array.h')
-rw-r--r--tools/lib/api/fd/array.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/api/fd/array.h b/tools/lib/api/fd/array.h
index 7fcf21a33c0c..60ad197c8ee9 100644
--- a/tools/lib/api/fd/array.h
+++ b/tools/lib/api/fd/array.h
@@ -42,6 +42,7 @@ struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow);
void fdarray__delete(struct fdarray *fda);
int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags);
+int fdarray__dup_entry_from(struct fdarray *fda, int pos, struct fdarray *from);
int fdarray__poll(struct fdarray *fda, int timeout);
int fdarray__filter(struct fdarray *fda, short revents,
void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),