From: khizmax Date: Mon, 23 Mar 2015 18:09:30 +0000 (+0300) Subject: Removed redundant locking from lazy-list X-Git-Tag: v2.1.0~296^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b9a76a0b206cad4e60b9ea8f9222662bcd92abc6;p=libcds.git Removed redundant locking from lazy-list --- 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(); }