summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
21ac4c5)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
static inline void cds_list_add_rcu(struct cds_list_head *newp, struct cds_list_head *head)
{
*/
static inline void cds_list_add_rcu(struct cds_list_head *newp, struct cds_list_head *head)
{
- newp->next = head->next;
+ struct cds_list_head *first = head->next;
+
+ newp->next = first;
- cmm_smp_wmb();
- head->next->prev = newp;
- head->next = newp;
+ rcu_assign_pointer(head->next, newp);
+ first->prev = newp;
}
/* replace an old entry atomically.
}
/* replace an old entry atomically.
static inline void cds_list_del_rcu(struct cds_list_head *elem)
{
elem->next->prev = elem->prev;
static inline void cds_list_del_rcu(struct cds_list_head *elem)
{
elem->next->prev = elem->prev;
- elem->prev->next = elem->next;
+ CMM_STORE_SHARED(elem->prev->next, elem->next);