RCU list operations
include/structures/list_rcu.h View source View on GitHubFunctions
Section titled “Functions”list_node_init_rcu
Section titled “list_node_init_rcu”list_head_init_rcu
Section titled “list_head_init_rcu”list_node_link_between_rcu
Section titled “list_node_link_between_rcu”list_head_push_front_rcu
Section titled “list_head_push_front_rcu”list_head_push_back_rcu
Section titled “list_head_push_back_rcu”list_node_delete_rcu
Section titled “list_node_delete_rcu” TODO
Consider poisoning (not just NULL) and also maybe using an address_space for RCU lists
list_node_delete_bidir_rcu
Section titled “list_node_delete_bidir_rcu”list_node_replace_rcu
Section titled “list_node_replace_rcu”list_splice_between_rcu
Section titled “list_splice_between_rcu”list_head_splice_front_rcu
Section titled “list_head_splice_front_rcu”copy src onto the front of dst
list_splice_between_init_rcu
Section titled “list_splice_between_init_rcu”list_head_splice_front_init_rcu
Section titled “list_head_splice_front_init_rcu”list_head_splice_back_init_rcu
Section titled “list_head_splice_back_init_rcu”hlist_node_unlink
Section titled “hlist_node_unlink”void hlist_node_unlink(struct hlist_node *n) source hlist_del_rcu
Section titled “hlist_del_rcu”void hlist_del_rcu(struct hlist_node *n) source hlist_del_init_rcu
Section titled “hlist_del_init_rcu”void hlist_del_init_rcu(struct hlist_node *n) source hlist_replace_rcu
Section titled “hlist_replace_rcu”void hlist_replace_rcu(struct hlist_node *old, struct hlist_node *new) source hlists_swap_heads_rcu
Section titled “hlists_swap_heads_rcu”void hlists_swap_heads_rcu(
struct hlist_head *left,
struct hlist_head *right
) source hlist_add_head_rcu
Section titled “hlist_add_head_rcu”void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h) source hlist_add_tail_rcu
Section titled “hlist_add_tail_rcu”void hlist_add_tail_rcu(struct hlist_node *n, struct hlist_head *h) source hlist_add_before_rcu
Section titled “hlist_add_before_rcu”void hlist_add_before_rcu(
struct hlist_node *n,
struct hlist_node *next
) source hlist_add_behind_rcu
Section titled “hlist_add_behind_rcu”void hlist_add_behind_rcu(
struct hlist_node *n,
struct hlist_node *prev
) source Macros
Section titled “Macros”list_next_rcu
Section titled “list_next_rcu”#define list_next_rcu(list) source Expansion
#define list_next_rcu(list) (*((struct list_node **) &(list)->next)) list_bidir_prev_rcu
Section titled “list_bidir_prev_rcu”#define list_bidir_prev_rcu(list) source Expansion
#define list_bidir_prev_rcu(list) (*((struct list_node **) &(list)->prev)) list_tail_rcu
Section titled “list_tail_rcu”#define list_tail_rcu(head) source Expansion
#define list_tail_rcu(head) (*((struct list_node **) &(list_root(head))->prev)) list_entry_rcu
Section titled “list_entry_rcu”#define list_entry_rcu(ptr, type, member) source Expansion
#define list_entry_rcu(ptr, type, member) \
container_of(rcu_dereference(ptr), type, member) list_first_or_null_rcu
Section titled “list_first_or_null_rcu”#define list_first_or_null_rcu(ptr, type, member) source Expansion
#define list_first_or_null_rcu(ptr, type, member) \
({ \
__auto_type __ptr = list_root(ptr); \
struct list_node *__next = rcu_dereference(__ptr->next); \
cc_likely(__ptr != __next) ? list_entry(__next, type, member) : NULL; \
}) list_next_or_null_rcu
Section titled “list_next_or_null_rcu”#define list_next_or_null_rcu(head, ptr, type, member) source Expansion
#define list_next_or_null_rcu(head, ptr, type, member) \
({ \
__auto_type __head = list_root(head); \
struct list_node *__ptr = (ptr); \
struct list_node *__next = rcu_dereference(__ptr->next); \
cc_likely(__next != __head) ? list_entry(__next, type, member) : NULL; \
}) list_for_each_rcu
Section titled “list_for_each_rcu”#define list_for_each_rcu(pos, head) source Expansion
#define list_for_each_rcu(pos, head) \
for (pos = rcu_dereference(list_root(head)->next); pos != list_root(head); \
pos = rcu_dereference(pos->next)) list_for_each_entry_rcu
Section titled “list_for_each_entry_rcu”#define list_for_each_entry_rcu(pos, head, member) source Expansion
#define list_for_each_entry_rcu(pos, head, member) \
for (pos = list_entry_rcu(list_root(head)->next, typeof(*pos), member); \
&pos->member != list_root(head); \
pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) list_for_each_entry_continue_rcu
Section titled “list_for_each_entry_continue_rcu”#define list_for_each_entry_continue_rcu(pos, head, member) source Expansion
#define list_for_each_entry_continue_rcu(pos, head, member) \
for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
&pos->member != list_root(head); \
pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) list_for_each_entry_from_rcu
Section titled “list_for_each_entry_from_rcu”#define list_for_each_entry_from_rcu(pos, head, member) source Expansion
#define list_for_each_entry_from_rcu(pos, head, member) \
for (; &pos->member != list_root(head); \
pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) hlist_first_rcu
Section titled “hlist_first_rcu”#define hlist_first_rcu(head) source Expansion
#define hlist_first_rcu(head) (*((struct hlist_node **) &(head)->first)) hlist_next_rcu
Section titled “hlist_next_rcu”#define hlist_next_rcu(node) source Expansion
#define hlist_next_rcu(node) (*((struct hlist_node **) &(node)->next)) hlist_pprev_rcu
Section titled “hlist_pprev_rcu”#define hlist_pprev_rcu(node) source Expansion
#define hlist_pprev_rcu(node) (*((struct hlist_node **) ((node)->pprev))) hlist_entry_rcu
Section titled “hlist_entry_rcu”#define hlist_entry_rcu(ptr, type, member) source Expansion
#define hlist_entry_rcu(ptr, type, member) \
container_of(rcu_dereference(ptr), type, member) hlist_for_each_node_rcu
Section titled “hlist_for_each_node_rcu”#define hlist_for_each_node_rcu(pos, head) source Expansion
#define hlist_for_each_node_rcu(pos, head) \
for (pos = rcu_dereference(hlist_first_rcu(head)); pos; \
pos = rcu_dereference(hlist_next_rcu(pos))) hlist_for_each_entry_rcu
Section titled “hlist_for_each_entry_rcu”#define hlist_for_each_entry_rcu(pos, head, member) source Expansion
#define hlist_for_each_entry_rcu(pos, head, member) \
for (pos = hlist_entry_safe(rcu_dereference(hlist_first_rcu(head)), \
typeof(*(pos)), member); \
pos; pos = hlist_entry_safe( \
rcu_dereference(hlist_next_rcu(&(pos)->member)), \
typeof(*(pos)), member)) hlist_for_each_entry_continue_rcu
Section titled “hlist_for_each_entry_continue_rcu”#define hlist_for_each_entry_continue_rcu(pos, member) source Expansion
#define hlist_for_each_entry_continue_rcu(pos, member) \
for (pos = \
hlist_entry_safe(rcu_dereference(hlist_next_rcu(&(pos)->member)), \
typeof(*(pos)), member); \
pos; pos = hlist_entry_safe( \
rcu_dereference(hlist_next_rcu(&(pos)->member)), \
typeof(*(pos)), member)) hlist_for_each_entry_from_rcu
Section titled “hlist_for_each_entry_from_rcu”#define hlist_for_each_entry_from_rcu(pos, member) source Expansion
#define hlist_for_each_entry_from_rcu(pos, member) \
for (; pos; pos = hlist_entry_safe( \
rcu_dereference(hlist_next_rcu(&(pos)->member)), \
typeof(*(pos)), member))