#include <stddef.h>
Data Structures | |
struct | list_head |
struct | hlist_head |
struct | hlist_node |
Macros | |
#define | offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
#define | container_of(ptr, type, member) |
container_of - cast a member of a structure out to the containing structure More... | |
#define | typecheck(type, x) |
#define | prefetch(x) 1 |
#define | smp_wmb() |
#define | LIST_POISON1 ((void *) 0x00100100) |
#define | LIST_POISON2 ((void *) 0x00200200) |
#define | LIST_HEAD_INIT(name) { &(name), &(name) } |
#define | LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) |
#define | INIT_LIST_HEAD(ptr) |
#define | list_entry(ptr, type, member) container_of(ptr, type, member) |
list_entry - get the struct for this entry : the &struct list_head pointer. More... | |
#define | list_for_each(pos, head) |
list_for_each - iterate over a list : the &struct list_head to use as a loop counter. More... | |
#define | __list_for_each(pos, head) for (pos = (head)->next; pos != (head); pos = pos->next) |
__list_for_each - iterate over a list : the &struct list_head to use as a loop counter. More... | |
#define | list_for_each_prev(pos, head) |
list_for_each_prev - iterate over a list backwards : the &struct list_head to use as a loop counter. More... | |
#define | list_for_each_safe(pos, n, head) |
list_for_each_safe - iterate over a list safe against removal of list entry : the &struct list_head to use as a loop counter. More... | |
#define | list_for_each_entry(pos, head, member) |
list_for_each_entry - iterate over list of given type : the type * to use as a loop counter. More... | |
#define | list_for_each_entry_reverse(pos, head, member) |
list_for_each_entry_reverse - iterate backwards over list of given type. More... | |
#define | list_prepare_entry(pos, head, member) ((pos) ? : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use as a start point in list_for_each_entry_continue : the type * to use as a start point : the head of the list : the name of the list_struct within the struct. More... | |
#define | list_for_each_entry_continue(pos, head, member) |
list_for_each_entry_continue - iterate over list of given type continuing after existing point : the type * to use as a loop counter. More... | |
#define | list_for_each_entry_safe(pos, n, head, member) |
list_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop counter. More... | |
#define | list_for_each_rcu(pos, head) |
list_for_each_rcu - iterate over an rcu-protected list : the &struct list_head to use as a loop counter. More... | |
#define | __list_for_each_rcu(pos, head) |
#define | list_for_each_safe_rcu(pos, n, head) |
list_for_each_safe_rcu - iterate over an rcu-protected list safe against removal of list entry : the &struct list_head to use as a loop counter. More... | |
#define | list_for_each_entry_rcu(pos, head, member) |
list_for_each_entry_rcu - iterate over rcu list of given type : the type * to use as a loop counter. More... | |
#define | list_for_each_continue_rcu(pos, head) |
list_for_each_continue_rcu - iterate over an rcu-protected list continuing after existing point. More... | |
#define | HLIST_HEAD_INIT { .first = NULL } |
#define | HLIST_HEAD(name) struct hlist_head name = { .first = NULL } |
#define | INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) |
#define | INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL) |
#define | hlist_del_rcu_init hlist_del_init |
#define | hlist_entry(ptr, type, member) container_of(ptr,type,member) |
#define | hlist_for_each(pos, head) |
#define | hlist_for_each_safe(pos, n, head) |
#define | hlist_for_each_entry(tpos, pos, head, member) |
hlist_for_each_entry - iterate over list of given type : the type * to use as a loop counter. More... | |
#define | hlist_for_each_entry_continue(tpos, pos, member) |
hlist_for_each_entry_continue - iterate over a hlist continuing after existing point : the type * to use as a loop counter. More... | |
#define | hlist_for_each_entry_from(tpos, pos, member) |
hlist_for_each_entry_from - iterate over a hlist continuing from existing point : the type * to use as a loop counter. More... | |
#define | hlist_for_each_entry_safe(tpos, pos, n, head, member) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop counter. More... | |
#define | hlist_for_each_entry_rcu(tpos, pos, head, member) |
hlist_for_each_entry_rcu - iterate over rcu list of given type : the type * to use as a loop counter. More... | |
__list_for_each - iterate over a list : the &struct list_head to use as a loop counter.
: the head for your list.
This variant differs from list_for_each() in that it's the simplest possible list iteration code, no prefetching is done. Use this for code that knows the list to be very short (empty or 1 entry) most of the time.
#define __list_for_each_rcu | ( | pos, | |
head | |||
) |
#define container_of | ( | ptr, | |
type, | |||
member | |||
) |
container_of - cast a member of a structure out to the containing structure
: the pointer to the member. : the type of the container struct this is embedded in. : the name of the member within the struct.
Referenced by do_alarm_run(), get_next_alarm_run(), TC_GET_TARGET(), ulogd_do_timer_run(), and ulogd_get_next_timer_run().
#define hlist_del_rcu_init hlist_del_init |
#define hlist_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr,type,member) |
#define hlist_for_each | ( | pos, | |
head | |||
) |
#define hlist_for_each_entry | ( | tpos, | |
pos, | |||
head, | |||
member | |||
) |
hlist_for_each_entry - iterate over list of given type : the type * to use as a loop counter.
: the &struct hlist_node to use as a loop counter. : the head for your list. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_continue | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_continue - iterate over a hlist continuing after existing point : the type * to use as a loop counter.
: the &struct hlist_node to use as a loop counter. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_from | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_from - iterate over a hlist continuing from existing point : the type * to use as a loop counter.
: the &struct hlist_node to use as a loop counter. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_rcu | ( | tpos, | |
pos, | |||
head, | |||
member | |||
) |
hlist_for_each_entry_rcu - iterate over rcu list of given type : the type * to use as a loop counter.
: the &struct hlist_node to use as a loop counter. : the head for your list. : the name of the hlist_node within the struct.
This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_rcu() as long as the traversal is guarded by rcu_read_lock().
#define hlist_for_each_entry_safe | ( | tpos, | |
pos, | |||
n, | |||
head, | |||
member | |||
) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop counter.
: the &struct hlist_node to use as a loop counter.
: another &struct hlist_node to use as temporary storage : the head for your list. : the name of the hlist_node within the struct.
#define hlist_for_each_safe | ( | pos, | |
n, | |||
head | |||
) |
#define HLIST_HEAD | ( | name | ) | struct hlist_head name = { .first = NULL } |
#define HLIST_HEAD_INIT { .first = NULL } |
#define INIT_HLIST_HEAD | ( | ptr | ) | ((ptr)->first = NULL) |
#define INIT_LIST_HEAD | ( | ptr | ) |
Referenced by create_fds(), do_alarm_run(), exp_filter_create(), hashtable_create(), nft_chain_list_alloc(), nft_init(), nft_rule_alloc(), nft_rule_list_alloc(), nft_set_alloc(), nft_set_list_alloc(), nft_table_list_alloc(), nlif_open(), queue_create(), and queue_node_init().
#define list_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr, type, member) |
list_entry - get the struct for this entry : the &struct list_head pointer.
: the type of the struct this is embedded in. : the name of the list_struct within the struct.
Referenced by hashtable_find(), hashtable_flush(), hashtable_iterate_limit(), nft_chain_list_iter_create(), nft_chain_list_iter_next(), nft_rule_expr_iter_create(), nft_rule_expr_iter_next(), nft_rule_list_iter_create(), nft_rule_list_iter_next(), nft_set_elems_iter_create(), nft_set_elems_iter_next(), nft_set_elems_nlmsg_build_payload_iter(), nft_set_list_iter_create(), nft_set_list_iter_next(), nft_table_list_iter_create(), nft_table_list_iter_next(), TC_DELETE_NUM_ENTRY(), TC_FIRST_CHAIN(), TC_FIRST_RULE(), and TC_NEXT_RULE().
#define list_for_each | ( | pos, | |
head | |||
) |
list_for_each - iterate over a list : the &struct list_head to use as a loop counter.
: the head for your list.
Referenced by hashtable_find().
#define list_for_each_continue_rcu | ( | pos, | |
head | |||
) |
list_for_each_continue_rcu - iterate over an rcu-protected list continuing after existing point.
: the &struct list_head to use as a loop counter. : the head for your list.
This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as list_add_rcu() as long as the traversal is guarded by rcu_read_lock().
#define list_for_each_entry | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry - iterate over list of given type : the type * to use as a loop counter.
: the head for your list. : the name of the list_struct within the struct.
Referenced by chain_lookup(), cthelper_init(), exp_filter_add(), exp_filter_find(), fork_process_dump(), fork_process_new(), netlink_add_rule_list(), netlink_linearize_rule(), netlink_list_chains(), nft_expr_ops_lookup(), nft_rule_nlmsg_build_payload(), nft_set_elem_foreach(), nft_set_elems_nlmsg_build_payload(), nlif_get_ifflags(), nlif_index2name(), origin_find(), queue_stats_show(), rule_print(), set_lookup(), symbol_lookup(), table_lookup(), TC_COMMIT(), TC_ZERO_ENTRIES(), and unregister_fd().
#define list_for_each_entry_continue | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_continue - iterate over list of given type continuing after existing point : the type * to use as a loop counter.
: the head for your list. : the name of the list_struct within the struct.
#define list_for_each_entry_rcu | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_rcu - iterate over rcu list of given type : the type * to use as a loop counter.
: the head for your list. : the name of the list_struct within the struct.
This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as list_add_rcu() as long as the traversal is guarded by rcu_read_lock().
#define list_for_each_entry_reverse | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_reverse - iterate backwards over list of given type.
: the type * to use as a loop counter. : the head for your list. : the name of the list_struct within the struct.
#define list_for_each_entry_safe | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop counter.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Referenced by chain_free(), destroy_fds(), do_alarm_run(), erec_print_list(), fork_process_delete(), interval_map_decompose(), mnl_batch_reset(), nft_chain_list_foreach(), nft_chain_list_free(), nft_rule_expr_foreach(), nft_rule_free(), nft_rule_list_foreach(), nft_rule_list_free(), nft_run(), nft_set_free(), nft_set_list_foreach(), nft_set_list_free(), nft_table_list_foreach(), nft_table_list_free(), nlif_close(), origin_unregister(), scope_release(), set_to_intervals(), stack_item_pop(), stmt_list_free(), table_free(), TC_FLUSH_ENTRIES(), TC_FREE(), and unregister_fd().
#define list_for_each_prev | ( | pos, | |
head | |||
) |
list_for_each_prev - iterate over a list backwards : the &struct list_head to use as a loop counter.
: the head for your list.
#define list_for_each_rcu | ( | pos, | |
head | |||
) |
list_for_each_rcu - iterate over an rcu-protected list : the &struct list_head to use as a loop counter.
: the head for your list.
This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as list_add_rcu() as long as the traversal is guarded by rcu_read_lock().
#define list_for_each_safe | ( | pos, | |
n, | |||
head | |||
) |
list_for_each_safe - iterate over a list safe against removal of list entry : the &struct list_head to use as a loop counter.
: another &struct list_head to use as temporary storage : the head for your list.
Referenced by hashtable_flush(), hashtable_iterate_limit(), and queue_iterate().
#define list_for_each_safe_rcu | ( | pos, | |
n, | |||
head | |||
) |
list_for_each_safe_rcu - iterate over an rcu-protected list safe against removal of list entry : the &struct list_head to use as a loop counter.
: another &struct list_head to use as temporary storage : the head for your list.
This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as list_add_rcu() as long as the traversal is guarded by rcu_read_lock().
Referenced by main(), and set_to_intervals().
#define LIST_POISON1 ((void *) 0x00100100) |
#define LIST_POISON2 ((void *) 0x00200200) |
#define list_prepare_entry | ( | pos, | |
head, | |||
member | |||
) | ((pos) ? : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use as a start point in list_for_each_entry_continue : the type * to use as a start point : the head of the list : the name of the list_struct within the struct.
Referenced by nfq_ip6_set_transport_header(), nl_object_clone(), and xtables_lock().
#define prefetch | ( | x | ) | 1 |
#define smp_wmb | ( | ) |