From 48fc7c34f70be8102997baa2af2638a05211c48d Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 23 Mar 2015 21:09:30 +0300 Subject: [PATCH] Removed redundant locking from lazy-list --- cds/intrusive/lazy_list_nogc.h | 2 -- cds/intrusive/lazy_list_rcu.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/cds/intrusive/lazy_list_nogc.h b/cds/intrusive/lazy_list_nogc.h index 29412d55..ae950445 100644 --- a/cds/intrusive/lazy_list_nogc.h +++ b/cds/intrusive/lazy_list_nogc.h @@ -611,9 +611,7 @@ namespace cds { namespace intrusive { search( pHead, val, pos, cmp ); if ( pos.pCur != &m_Tail ) { if ( cmp( *node_traits::to_value_ptr( *pos.pCur ), val ) == 0 ) - { return iterator( pos.pCur ); - } } return end(); } diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index 7d3b1f53..ceabfa00 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -1105,11 +1105,8 @@ namespace cds { namespace intrusive { search( pHead, val, pos, cmp ); if ( pos.pCur != &m_Tail ) { - std::unique_lock< typename node_type::lock_type> al( pos.pCur->m_Lock ); if ( cmp( *node_traits::to_value_ptr( *pos.pCur ), val ) == 0 ) - { return const_iterator( pos.pCur ); - } } return end(); } -- 2.34.1