Debian Codegraph @

runtime/linux/map_list.h

raw
1 /* -*- linux-c -*-
2 * Map list abstractions
3 * Copyright (C) 2012 Red Hat Inc.
4 *
5 * This file is part of systemtap, and is free software. You can
6 * redistribute it and/or modify it under the terms of the GNU General
7 * Public License (GPL); either version 2, or (at your option) any
8 * later version.
9 */
10
11 #ifndef _LINUX_MAP_LIST_H_
12 #define _LINUX_MAP_LIST_H_
13
14 #include <linux/list.h>
15
16 #define mlist_head list_head
17 #define mlist_next list_next
18 #define mlist_prev list_prev
19
20 #define INIT_MLIST_HEAD INIT_LIST_HEAD
21
22 #define mlist_add list_add
23 #define mlist_del list_del
24 #define mlist_empty list_empty
25 #define mlist_entry list_entry
26 #define mlist_move_tail list_move_tail
27
28 #define mlist_for_each_safe list_for_each_safe
29
30 static inline struct list_head* list_next(struct list_head* head)
31 {
32 return head->next;
33 }
34
35 static inline struct list_head* list_prev(struct list_head* head)
36 {
37 return head->prev;
38 }
39
40
41 #define mhlist_head hlist_head
42 #define mhlist_node hlist_node
43
44 #define INIT_MHLIST_HEAD INIT_HLIST_HEAD
45 #define INIT_MHLIST_NODE INIT_HLIST_NODE
46
47 #define mhlist_add_head hlist_add_head
48 #define mhlist_del_init hlist_del_init
49
50 #define mhlist_for_each_entry stap_hlist_for_each_entry
51
52
53 #endif /* _LINUX_MAP_LIST_H_ */