summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2010-02-09 02:18:22 +0300
committerDavid S. Miller <davem@davemloft.net>2010-02-10 22:12:06 +0300
commit66655de6d132b726be64c324bc3f9ea366d20697 (patch)
treed88c42a19de245e4a81337eef6bf06555586005d /include
parentb1109bf085c8dd69537b7876ea83f914dd1fe46a (diff)
downloadlinux-66655de6d132b726be64c324bc3f9ea366d20697.tar.xz
seq_file: Add helpers for iteration over a hlist
Some places in kernel need to iterate over a hlist in seq_file, so provide some common helpers. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/seq_file.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 8366d8f12e53..c95bcdc18f4c 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -135,4 +135,15 @@ extern struct list_head *seq_list_start_head(struct list_head *head,
extern struct list_head *seq_list_next(void *v, struct list_head *head,
loff_t *ppos);
+/*
+ * Helpers for iteration over hlist_head-s in seq_files
+ */
+
+extern struct hlist_node *seq_hlist_start(struct hlist_head *head,
+ loff_t pos);
+extern struct hlist_node *seq_hlist_start_head(struct hlist_head *head,
+ loff_t pos);
+extern struct hlist_node *seq_hlist_next(void *v, struct hlist_head *head,
+ loff_t *ppos);
+
#endif