From: Mathieu Desnoyers Date: Thu, 27 Oct 2011 04:30:49 +0000 (+0200) Subject: Move replace code out from _cds_lfht_add() X-Git-Tag: v0.7.0~43^2~86 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=83beee94416bdffdec505bc33cfd79859f6aa243;hp=83beee94416bdffdec505bc33cfd79859f6aa243;p=urcu.git 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 Signed-off-by: Mathieu Desnoyers ---