diff options
author | David Ahern <dsahern@gmail.com> | 2013-10-09 07:26:52 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-10-14 17:28:48 +0400 |
commit | 813335b8b27d9ceeb67a073f501ada8b8dde37a7 (patch) | |
tree | 6089b90d2cefe9c93576dfbf7146c486d4cf6a2b /tools/perf/util/rblist.h | |
parent | 87f918685a452be514d060a09eeb4e0c91422e86 (diff) | |
download | linux-813335b8b27d9ceeb67a073f501ada8b8dde37a7.tar.xz |
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/rblist.h')
-rw-r--r-- | tools/perf/util/rblist.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/rblist.h b/tools/perf/util/rblist.h index 6d0cae5ae83d..ff9913b994c2 100644 --- a/tools/perf/util/rblist.h +++ b/tools/perf/util/rblist.h @@ -32,6 +32,7 @@ void rblist__delete(struct rblist *rblist); int rblist__add_node(struct rblist *rblist, const void *new_entry); void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node); struct rb_node *rblist__find(struct rblist *rblist, const void *entry); +struct rb_node *rblist__findnew(struct rblist *rblist, const void *entry); struct rb_node *rblist__entry(const struct rblist *rblist, unsigned int idx); static inline bool rblist__empty(const struct rblist *rblist) |