X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Frculist.h;fp=urcu%2Frculist.h;h=6759947dba2b78bcdb41b16222afd490922722f9;hb=9f446823a2f64fbc9b9af984dc797c73f4107310;hp=1fd2df388f57cefc0ea19fa02a0c8c0b627847e8;hpb=98f483d24f69785a7fb2e988f1053c34e84a4e61;p=userspace-rcu.git diff --git a/urcu/rculist.h b/urcu/rculist.h index 1fd2df3..6759947 100644 --- a/urcu/rculist.h +++ b/urcu/rculist.h @@ -33,7 +33,9 @@ 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; newp->prev = head; head->next->prev = newp; rcu_assign_pointer(head->next, newp);