mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
klist: implement klist_prev()
klist_prev() gets the previous element in the list. It is useful to traverse through the list in reverse order, for example, to provide LIFO (last in first out) variant of access. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
ddef08dd00
commit
2e0fed7f7c
2 changed files with 42 additions and 0 deletions
|
@ -63,6 +63,7 @@ extern void klist_iter_init(struct klist *k, struct klist_iter *i);
|
|||
extern void klist_iter_init_node(struct klist *k, struct klist_iter *i,
|
||||
struct klist_node *n);
|
||||
extern void klist_iter_exit(struct klist_iter *i);
|
||||
extern struct klist_node *klist_prev(struct klist_iter *i);
|
||||
extern struct klist_node *klist_next(struct klist_iter *i);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue