X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Frcuhlist.h;h=6d88692e854faf51a4105a8c7d46baa5c624e6c6;hp=36da15bc31d95394420a6958c05a5435927b1c2b;hb=90bdf188e835cadbc12d5fa7e4523056ecd97cf4;hpb=6734fec18ba760c816a32750cbb851414ef899e4 diff --git a/urcu/rcuhlist.h b/urcu/rcuhlist.h index 36da15b..6d88692 100644 --- a/urcu/rcuhlist.h +++ b/urcu/rcuhlist.h @@ -36,10 +36,9 @@ void cds_hlist_add_head_rcu(struct cds_hlist_node *newp, { newp->next = head->next; newp->prev = (struct cds_hlist_node *)head; - cmm_smp_wmb(); if (head->next) head->next->prev = newp; - head->next = newp; + rcu_assign_pointer(head->next, newp); } /* Remove element from list. */ @@ -48,7 +47,7 @@ void cds_hlist_del_rcu(struct cds_hlist_node *elem) { if (elem->next) elem->next->prev = elem->prev; - elem->prev->next = elem->next; + CMM_STORE_SHARED(elem->prev->next, elem->next); } /*