Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/rculist.h
Show All 38 Lines | |||||
#define list_next_rcu(head) (*((struct list_head **)(&(head)->next))) | #define list_next_rcu(head) (*((struct list_head **)(&(head)->next))) | ||||
#define list_prev_rcu(head) (*((struct list_head **)(&(head)->prev))) | #define list_prev_rcu(head) (*((struct list_head **)(&(head)->prev))) | ||||
#define list_for_each_entry_rcu(pos, head, member) \ | #define list_for_each_entry_rcu(pos, head, member) \ | ||||
for (pos = list_entry_rcu((head)->next, typeof(*(pos)), member); \ | for (pos = list_entry_rcu((head)->next, typeof(*(pos)), member); \ | ||||
&(pos)->member != (head); \ | &(pos)->member != (head); \ | ||||
pos = list_entry_rcu((pos)->member.next, typeof(*(pos)), member)) | pos = list_entry_rcu((pos)->member.next, typeof(*(pos)), member)) | ||||
#define list_for_each_entry_lockless(pos, head, member) \ | |||||
list_for_each_entry_rcu(pos, head, member) | |||||
static inline void | static inline void | ||||
linux_list_add_rcu(struct list_head *new, struct list_head *prev, | linux_list_add_rcu(struct list_head *new, struct list_head *prev, | ||||
struct list_head *next) | struct list_head *next) | ||||
{ | { | ||||
new->next = next; | new->next = next; | ||||
new->prev = prev; | new->prev = prev; | ||||
rcu_assign_pointer(list_next_rcu(prev), new); | rcu_assign_pointer(list_next_rcu(prev), new); | ||||
next->prev = new; | next->prev = new; | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |