X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Frculist.h;h=6759947dba2b78bcdb41b16222afd490922722f9;hb=refs%2Fheads%2Furcu%2Frcuja-range;hp=1fd2df388f57cefc0ea19fa02a0c8c0b627847e8;hpb=db757a4e5c7ecba45a79dc9c15090cb3deb659b5;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);