Move replace code out from _cds_lfht_add()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 27 Oct 2011 04:30:49 +0000 (06:30 +0200)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 27 Oct 2011 04:30:49 +0000 (06:30 +0200)
commit83beee94416bdffdec505bc33cfd79859f6aa243
tree4de4f596f10aca3ca8358ece124e0bf66d463383
parent3fb86f26cfea354e44be1099642fc88436e3edf3
Move replace code out from _cds_lfht_add()

Original patch from Lai Jiangshan, reworked significantly to keep the
iterator semantic, where a "next" node is never re-read after being
looked up within a RCU read-side critical section after it has been
validated.

Although strictly speaking the "replace" code re-checks that the next
node is not logically removed with a cmpxchg, I prefer to ensure that
all lookup paths behave similarly. It will make it easier to track
behavior later on if they all follow the same rules.

Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c
This page took 0.025126 seconds and 4 git commands to generate.