summaryrefslogtreecommitdiff
path: root/tools/perf/util/intlist.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2013-10-08 21:26:52 -0600
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-10-14 10:28:48 -0300
commit813335b8b27d9ceeb67a073f501ada8b8dde37a7 (patch)
tree6089b90d2cefe9c93576dfbf7146c486d4cf6a2b /tools/perf/util/intlist.h
parent87f918685a452be514d060a09eeb4e0c91422e86 (diff)
perf util: Add findnew method to intlist
Similar to other findnew based methods if the requested object is not found, add it to the list. v2: followed format of other findnew methods per acme's request Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1381289214-24885-2-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/intlist.h')
-rw-r--r--tools/perf/util/intlist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/intlist.h b/tools/perf/util/intlist.h
index 0eb00ac39e01..aa6877d36858 100644
--- a/tools/perf/util/intlist.h
+++ b/tools/perf/util/intlist.h
@@ -24,6 +24,7 @@ int intlist__add(struct intlist *ilist, int i);
struct int_node *intlist__entry(const struct intlist *ilist, unsigned int idx);
struct int_node *intlist__find(struct intlist *ilist, int i);
+struct int_node *intlist__findnew(struct intlist *ilist, int i);
static inline bool intlist__has_entry(struct intlist *ilist, int i)
{