X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-ht.c;h=183fcb17d49a43da9eefddb3751ea0f4888bec8f;hp=500b8d36fff51dffaa3d2b8548b70f83be60518e;hb=85f6ba5f7a5b91ecb4a7a8a6d66cd17ff481de21;hpb=e0ba718a906a70053d699a25c1d59b5bbdbf8715 diff --git a/urcu-ht.c b/urcu-ht.c index 500b8d3..183fcb1 100644 --- a/urcu-ht.c +++ b/urcu-ht.c @@ -174,9 +174,14 @@ retry: node = rcu_dereference(*prev); } - /* Another concurrent thread stole it ? If so, let it deal with this. */ - if (cmpxchg(&node->stolen, 0, 1) != 0) - goto error; + if (!del_node) { + /* + * Another concurrent thread stole it ? If so, let it deal with + * this. + */ + if (cmpxchg(&node->stolen, 0, 1) != 0) + goto error; + } /* Found it ! pointer to object is in "prev" */ if (rcu_cmpxchg_pointer(prev, node, node->next) == node)