Skip to content

RCU list operations

include/structures/list_rcu.h View source View on GitHub
void list_node_init_rcu(struct list_node *n)
source
void list_head_init_rcu(struct list_head *h)
source
void list_node_link_between_rcu(
    struct list_node *new,
    struct list_node *prev,
    struct list_node *next
)
source
void list_head_push_front_rcu(
    struct list_head *h,
    struct list_node *n
)
source
void list_head_push_back_rcu(struct list_head *h, struct list_node *n)
source
void list_node_delete_rcu(struct list_node *n)
source
TODO

Consider poisoning (not just NULL) and also maybe using an address_space for RCU lists

void list_node_delete_bidir_rcu(struct list_node *n)
source
void list_node_replace_rcu(
    struct list_node *old,
    struct list_node *new
)
source
void list_splice_between_rcu(
    const struct list_node *list,
    struct list_node *prev,
    struct list_node *next
)
source
void list_head_splice_front_rcu(
    struct list_head *dst,
    struct list_head *src
)
source

copy src onto the front of dst

void list_splice_between_init_rcu(
    struct list_node *list,
    struct list_node *prev,
    struct list_node *next,
    void (*sync)(void)
)
source
void list_head_splice_front_init_rcu(
    struct list_head *dst,
    struct list_head *src,
    void (*sync)(void)
)
source
void list_head_splice_back_init_rcu(
    struct list_head *dst,
    struct list_head *src,
    void (*sync)(void)
)
source
void hlist_node_unlink(struct hlist_node *n)
source
void hlist_del_rcu(struct hlist_node *n)
source
void hlist_del_init_rcu(struct hlist_node *n)
source
void hlist_replace_rcu(struct hlist_node *old, struct hlist_node *new)
source
void hlists_swap_heads_rcu(
    struct hlist_head *left,
    struct hlist_head *right
)
source
void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h)
source
void hlist_add_tail_rcu(struct hlist_node *n, struct hlist_head *h)
source
void hlist_add_before_rcu(
    struct hlist_node *n,
    struct hlist_node *next
)
source
void hlist_add_behind_rcu(
    struct hlist_node *n,
    struct hlist_node *prev
)
source
#define list_next_rcu(list)
source
Expansion
#define list_next_rcu(list) (*((struct list_node **) &(list)->next))
#define list_bidir_prev_rcu(list)
source
Expansion
#define list_bidir_prev_rcu(list) (*((struct list_node **) &(list)->prev))
#define list_tail_rcu(head)
source
Expansion
#define list_tail_rcu(head) (*((struct list_node **) &(list_root(head))->prev))
#define list_entry_rcu(ptr, type, member)
source
Expansion
#define list_entry_rcu(ptr, type, member) \
    container_of(rcu_dereference(ptr), type, member)
#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; \
    })
#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; \
    })
#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))
#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))
#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))
#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))
#define hlist_first_rcu(head)
source
Expansion
#define hlist_first_rcu(head) (*((struct hlist_node **) &(head)->first))
#define hlist_next_rcu(node)
source
Expansion
#define hlist_next_rcu(node) (*((struct hlist_node **) &(node)->next))
#define hlist_pprev_rcu(node)
source
Expansion
#define hlist_pprev_rcu(node) (*((struct hlist_node **) ((node)->pprev)))
#define hlist_entry_rcu(ptr, type, member)
source
Expansion
#define hlist_entry_rcu(ptr, type, member) \
    container_of(rcu_dereference(ptr), type, member)
#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)))
#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))
#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))
#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))