aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fd/array.h
diff options
context:
space:
mode:
authorWang Nan <[email protected]>2016-07-14 08:34:34 +0000
committerArnaldo Carvalho de Melo <[email protected]>2016-07-15 20:27:46 +0000
commit2b4383470675c85add72725cc08840d36b409276 (patch)
tree04f0c42117300ca2325be79aa514a4d29d2cac91 /tools/lib/api/fd/array.h
parenttools: Simplify BITS_PER_LONG define (diff)
downloadkernel-2b4383470675c85add72725cc08840d36b409276.tar.gz
kernel-2b4383470675c85add72725cc08840d36b409276.zip
tools lib fd array: Allow associating a pointer cookie with each entry
Add a 'ptr' field to fdarray->priv array. This feature will be used by following commits, which introduce muiltiple 'struct perf_mmap' arrays for different types of mapping. Because of this, during fdarray__filter(), a simple 'idx' is not enough. Add a pointer cookie that allows to directly associate a 'struct perf_mmap' pointer to an fdarray entry. Signed-off-by: Wang Nan <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: He Kuang <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Nilay Vaish <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] 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 e87fd800fa8d..71287dddc05f 100644
--- a/tools/lib/api/fd/array.h
+++ b/tools/lib/api/fd/array.h
@@ -22,6 +22,7 @@ struct fdarray {
struct pollfd *entries;
union {
int idx;
+ void *ptr;
} *priv;
};