diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-02-08 23:18:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-10 11:12:06 -0800 |
commit | 66655de6d132b726be64c324bc3f9ea366d20697 (patch) | |
tree | d88c42a19de245e4a81337eef6bf06555586005d /include | |
parent | b1109bf085c8dd69537b7876ea83f914dd1fe46a (diff) |
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.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 8366d8f12e5..c95bcdc18f4 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 |