4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License version 2 for more details. A copy is
14 * included in the COPYING file that accompanied this code.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __LIBCFS_LINUX_LIST_H__
24 #define __LIBCFS_LINUX_LIST_H__
26 #include <linux/list.h>
28 #ifdef HAVE_HLIST_FOR_EACH_3ARG
29 #define cfs_hlist_for_each_entry(tpos, pos, head, member) \
30 hlist_for_each_entry(tpos, head, member)
31 #define cfs_hlist_for_each_entry_safe(tpos, pos, n, head, member) \
32 hlist_for_each_entry_safe(tpos, n, head, member)
33 #define cfs_hlist_for_each_entry_continue(tpos, pos, member) \
34 hlist_for_each_entry_continue(tpos, member)
35 #define cfs_hlist_for_each_entry_from(tpos, pos, member) \
36 hlist_for_each_entry_from(tpos, member)
38 #define cfs_hlist_for_each_entry(tpos, pos, head, member) \
39 hlist_for_each_entry(tpos, pos, head, member)
40 #define cfs_hlist_for_each_entry_safe(tpos, pos, n, head, member) \
41 hlist_for_each_entry_safe(tpos, pos, n, head, member)
42 #define cfs_hlist_for_each_entry_continue(tpos, pos, member) \
43 hlist_for_each_entry_continue(tpos, pos, member)
44 #define cfs_hlist_for_each_entry_from(tpos, pos, member) \
45 hlist_for_each_entry_from(tpos, pos, member)
48 #ifdef HAVE_HLIST_ADD_AFTER
49 #define hlist_add_behind(hnode, tail) hlist_add_after(tail, hnode)
50 #endif /* HAVE_HLIST_ADD_AFTER */
52 #endif /* __LIBCFS_LINUX_LIST_H__ */