diff options
| author | Dan Streetman <[email protected]> | 2014-06-04 16:09:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-06-04 16:54:07 -0700 |
| commit | fd16618e12a05df79a3439d72d5ffdac5d34f3da (patch) | |
| tree | 2c5642a1e51e8ecd30683dd32c6aae86d0b7b40e /tools/perf/scripts | |
| parent | adfab836f4908deb049a5128082719e689eed964 (diff) | |
lib/plist: add helper functions
Add PLIST_HEAD() to plist.h, equivalent to LIST_HEAD() from list.h, to
define and initialize a struct plist_head.
Add plist_for_each_continue() and plist_for_each_entry_continue(),
equivalent to list_for_each_continue() and list_for_each_entry_continue(),
to iterate over a plist continuing after the current position.
Add plist_prev() and plist_next(), equivalent to (struct list_head*)->prev
and ->next, implemented by list_prev_entry() and list_next_entry(), to
access the prev/next struct plist_node entry. These are needed because
unlike struct list_head, direct access of the prev/next struct plist_node
isn't possible; the list must be navigated via the contained struct
list_head. e.g. instead of accessing the prev by list_prev_entry(node,
node_list) it can be accessed by plist_prev(node).
Signed-off-by: Dan Streetman <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Dan Streetman <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Christian Ehrhardt <[email protected]>
Cc: Weijie Yang <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Bob Liu <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions