projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6fbeab
)
Fixed bug in MichaelLit<RCU>
author
khizmax
<libcds.dev@gmail.com>
Sun, 1 Nov 2015 15:34:54 +0000
(18:34 +0300)
committer
khizmax
<libcds.dev@gmail.com>
Sun, 1 Nov 2015 15:34:54 +0000
(18:34 +0300)
cds/intrusive/michael_list_rcu.h
patch
|
blob
|
history
diff --git
a/cds/intrusive/michael_list_rcu.h
b/cds/intrusive/michael_list_rcu.h
index 4fd6f839c914fa291e1d3943c199387f0fa4706c..b77cc9e880f4ec02484a21301f18621974de48f0 100644
(file)
--- a/
cds/intrusive/michael_list_rcu.h
+++ b/
cds/intrusive/michael_list_rcu.h
@@
-957,18
+957,21
@@
namespace cds { namespace intrusive {
back_off bkoff;
check_deadlock_policy::check();
+ node_type * pDel;
for (;;) {
{
rcu_lock l;
if ( !search( pos.refHead, val, pos, cmp ) )
return false;
+ // store pCur since it may be changed by unlink_node() slow path
+ pDel = pos.pCur;
if ( !unlink_node( pos, erase_mask )) {
bkoff();
continue;
}
}
-
- f( *node_traits::to_value_ptr(
*pos.pCur
) );
+ assert( pDel );
+ f( *node_traits::to_value_ptr(
pDel
) );
--m_ItemCounter;
return true;
}